This is a sample application that demonstrates how to leverage Active Directory for authentication and user security groups for authorization.
There are two applications, one that leverages AzureAd as the default authentication scheme, and the other that leverages OpenIdConnect.
You will need to update the appsettings.json file, or add an appsettings.Development.json that includes settings for your specific instance of Azure AD.
Register your application with Azure Active Directory.
Configure your application to send the groups as claims.
The security groups are returned with your GUID values, and NOT their name, which is one of the reasons I created constants, made my code more readable.