It is possible to use Microsoft Graph in an old ASP Net Core 2.1 application?
My application is using OpenID Connect to authenticate users but I need to query Microsoft Graph to get the users groups. ( Previously this was done using Azure AD Graph )
Can someone point me to some old examples of code that are working with 2.1 framework. Most of the examples I found are with new framework versions.
// Microsoft.AspNetCore.Authentication.OpenIdConnect, Version=2.1.2.0
.AddOpenIdConnect(option =>
{
option.ClientId = ClientId;
option.ClientSecret = ClientSecret;
option.Authority = $"https://login.microsoftonline.com/{Tenant}";
option.Resource = "https://graph.microsoft.net";
option.SignedOutRedirectUri = SignedOutRedirectUri;
option.CorrelationCookie.Name = "cookie name";
option.NonceCookie.Name = "nonce name";
option.NonceCookie.SecurePolicy = CookieSecurePolicy.Always;
option.CorrelationCookie.SecurePolicy = CookieSecurePolicy.Always;
....
}