What are best practices/resources for using teamsUserCredentials in a reactjs teams tab app? #9079
Unanswered
mr-github-user
asked this question in
Q&A
Replies: 1 comment
-
What you try to accomplish is doable and the steps look good to me. What error do you get in step 5? TeamsUserCredential aims to help you get an OAuth token easier when building a Teams tab app. After you get the token, you could reference existing materials for OAuth to consume the token. You may start with the AAD document here when building the Web API: https://learn.microsoft.com/en-us/azure/active-directory/develop/web-api-quickstart?pivots=devlang-aspnet |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like some help understanding how I should think about authentication/authorization especially inside a teams tab application.
I'm hoping to be able to use TeamsFx to obtain a token that will be accepted by my .net core API.
API authorization requirements:
How I thought I could get it to work:
Frontend(ReactJS teams tab application):
Backend(.net core web api):
4. Receive API Request from frontend with Authorization header.
5. Inspect token, and determine that the user is an authenticated Azure AD User.
6. Authorize user based on the user tenant or username.
7. Retrieve data and return response to frontend.
I've been able to accomplish steps 1-4, but have started running into issues on step 5.
Is what I'm trying to accomplish even possible as I've outlined it?
Is this a bad way to look at the problem?
Are there resources you could recommend to someone who has never had to setup authentication in the past?
Are there best practices when working with teamsfx?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions