Cambiar en el Manifiesto de la aplicación
Como habilitar Claim
https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims
Claim opcional disponibles
https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-claims-mapping
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
services.AddTransient<IPrincipal>(
provider => provider.GetService<IHttpContextAccessor>().HttpContext.User);
services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
.AddAzureAD(options => Configuration.Bind("AzureAd", options));
...
Vistas para hacer SignOut y SignIn:
Appsetting.ambiente.json
{
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
"Domain": "dev2tenant.onmicrosoft.com",
"TenantId": "254e256b-76d7-4ada-8bb6-74de17393e91",
"ClientId": "bbd174db-474b-4750-bd0d-a67c01369c13",
"CallbackPath": "/signin-oidc"
},
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}