title: Unable to get Azure AD Groups to appear in user claims
body: <p>I've read every article and post on this subject, to no avail.</p>
  <p>I have an MVC app in azure. I wanted to connect to Azure AD, and get the Groups for a user.</p>
  <p>To do this, firstly I altered the Program.cs</p>
  <pre><code>// Azure AD
  builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
      .AddMicrosoftIdentityWebApp(builder.Configuration.GetSection(&quot;AzureAd&quot;));
  </code></pre>
  <p>Also this:</p>
  <pre><code>builder.Services.AddControllersWithViews(options =&gt;
  {
      var policy = new AuthorizationPolicyBuilder()
          .RequireAuthenticatedUser()
          .Build();
  
      options.Filters.Add(new AuthorizeFilter(policy));
  });
  </code></pre>
  <p>Once I did this, it asked me to authenticate when I ran it. I logged in, and it worked. On my MVC page I added <code>@User.Claims.SingleOrDefault(_ =&gt; _.Type == &quot;name&quot;)?.Value;</code> and it works great.</p>
  <p>Next, I wanted to see what groups the user is in.</p>
  <p>I followed every guide I could find, but nothing seemed to work. In the user's claims, there is no 'groups' entry or anything suggesting overage (I assume it would appear in claims?).</p>
  <p>Now I don't know if I am missing some configuration from my appsettings file? I say this because my appsettings ONLY has this:</p>
  <pre><code> &quot;Logging&quot;: {
      &quot;LogLevel&quot;: {
        &quot;Default&quot;: &quot;Information&quot;,
        &quot;Microsoft.AspNetCore&quot;: &quot;Warning&quot;
      }
    },
    &quot;AllowedHosts&quot;: &quot;*&quot;,
    &quot;AzureAd&quot;: {
      &quot;Instance&quot;: &quot;https://login.microsoftonline.com/&quot;,
      &quot;ClientId&quot;: &quot;a guid&quot;,
      &quot;TenantId&quot;: &quot;another guid&quot;
    },
  </code></pre>
  <p>It's unclear. After adding the above, I went into Azure and I did various tasks:</p>
  <p>My web app : Token configuration &gt; Add groups claim <br>
  My web app : API permissions &gt; GroupMember.Read.All (Granted)<br>
  My web app : Manifest &gt; change to <code>&quot;groupMembershipClaims&quot;: &quot;All&quot;</code></p>
  <p>I also did the same thing in Enterprise applications &gt; MyApp | Single sign-on, I don't know what that is but it was in one of the many posts I read.</p>
  <p>What could I possibly be missing that is preventing the groups from appearing?</p>