Help with calling GraphApi after AzureAd authentication

John Lever 26 Reputation points
2021-11-15T10:49:28.793+00:00

We have an Azure WebApp using MSAL Identity to sign users in via AzureAD, we want to call MS Graph on behalf of the authenticated user to obtain user details and store these in custom cliams. we were previously using ADAL but are upgrading to MSAL.

The problem is calling Ms Graph it doenst work could someone advise where we have gone wrong ?

heres a code snippet

 public void ConfigureServices(IServiceCollection services)
        {
            var initialScopes = Configuration.GetValue
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,181 questions
{count} votes

1 answer

Sort by: Most helpful
  1. John Lever 26 Reputation points
    2021-11-16T09:01:00.957+00:00

    I have resolved the issue:

    I upgraded the framework to .net5 removed legacy authentication / adal / identity nuget pacakages then installed newer versions, the code then worked as expected.

    1 person found this answer helpful.
    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.