Hi,
Currently I'm trying to integrate Microsoft Entra Id to my project. I have configured Authority as DynamicOptions property to support the multi-tenant Authority endpoint of Microsoft Entra.
Noticed that, this Authority property not working even i have assigned the value of Authority in frontend.
Noticed that, Authority value defined in the frontend isn't being applied which results in an empty authorization endpoint when redirecting to Microsoft Entra.
Could you advise how to configure the Authority property dynamically to support Microsoft Entra's multi-tenant endpoint?
8 Answer(s)
-
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0
hi
Add to your
AuthServerproject.using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.IdentityModel.Protocols; using Microsoft.IdentityModel.Protocols.OpenIdConnect; using Volo.Abp.Account.Public.Web.ExternalProviders; using Volo.Abp.DependencyInjection; namespace AbpMicroservices.AuthServer; public class MyOpenIdConnectOptionsPostConfigureAccountExternalProviderOptions : IPostConfigureAccountExternalProviderOptions<OpenIdConnectOptions>, ITransientDependency { public Task PostConfigureAsync(string name, OpenIdConnectOptions options) { if (!string.IsNullOrEmpty(options.Authority)) { options.MetadataAddress = options.Authority; if (!options.MetadataAddress.EndsWith('/')) { options.MetadataAddress += "/"; } options.MetadataAddress += ".well-known/openid-configuration"; } options.ConfigurationManager = new ConfigurationManager<OpenIdConnectConfiguration>(options.MetadataAddress, new OpenIdConnectConfigurationRetriever(), new HttpDocumentRetriever(options.Backchannel) { RequireHttps = options.RequireHttpsMetadata }) { RefreshInterval = options.RefreshInterval, AutomaticRefreshInterval = options.AutomaticRefreshInterval, }; return Task.CompletedTask; } }Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Is it necessary to initialize a valid
Authorityvalue at first place? Can we leaveAuthorityempty and have it resolved at runtime, similar to howClientIdandClientSecretare handled? I have tried to leaveAuthorityempty, but it seem not working.Thanks.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)







