How to get auth token generated by the OAuth2 User-Agent flow

Pedro Vitorino 0 Reputation points
2023-03-22T12:04:49.47+00:00

Hello,

I'm using de user-agent flow for logging in my application. The flow works, but due to limitations on the tool I'm using, I can't access the generated token. Is there any API or method that I can use to retrieve the token after the login?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,891 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,469 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,856 Reputation points
    2023-03-23T02:50:13.79+00:00

    Hi Pedro Vitorino , since there is currently no endpoint in the Graph API to obtain the token being used, other alternative methods I can provide is to write the display token function in your app to return the token obtained by the Graph SDK, I am not sure if this meets the needs of your scenario. Hope this suggestion could help you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.