Is there a way to extract the JWT from a graphServiceClient call to use with other apis?

Copper Contributor

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


[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 ?   

0 Replies