Forum Discussion
RichardS
Aug 29, 2023Copper Contributor
Is there a way to extract the JWT from a graphServiceClient call to use with other apis?
I have an a function which authenticates a user, and gets their details and groups back , and presumably includes a JWT somewhere in the _graphServiceClient
[Authorize]
[AuthorizeForScopes(ScopeKeySection = "DownstreamApi:Scopes")]
public async Task<IActionResult> Profile()
{
User currentUser = await _graphServiceClient.Me.GetAsync();
var groups = await _graphServiceClient.Me.TransitiveMemberOf.GraphGroup.GetAsync();
}
Is there a way to extract the token which presumably has been used for authenticating the Me.GetAsync & getGroup calls, and using it as a token for another API call eg API/MyCustomAPI to get stuff from other sources ?
No RepliesBe the first to reply