diff --git a/backend/src/Squidex/Areas/IdentityServer/Config/IdentityServerServices.cs b/backend/src/Squidex/Areas/IdentityServer/Config/IdentityServerServices.cs index 74554242a..5231b29e7 100644 --- a/backend/src/Squidex/Areas/IdentityServer/Config/IdentityServerServices.cs +++ b/backend/src/Squidex/Areas/IdentityServer/Config/IdentityServerServices.cs @@ -77,6 +77,7 @@ namespace Squidex.Areas.IdentityServer.Config services.AddIdentityServer(options => { options.UserInteraction.ErrorUrl = "/error/"; + if (!string.IsNullOrWhiteSpace(urlsOptions.BaseUrl)) { options.PublicOrigin = urlsOptions.BaseUrl; diff --git a/backend/src/Squidex/Config/Authentication/MicrosoftAuthenticationServices.cs b/backend/src/Squidex/Config/Authentication/MicrosoftAuthenticationServices.cs index d03814afa..aabd68f12 100644 --- a/backend/src/Squidex/Config/Authentication/MicrosoftAuthenticationServices.cs +++ b/backend/src/Squidex/Config/Authentication/MicrosoftAuthenticationServices.cs @@ -27,6 +27,7 @@ namespace Squidex.Config.Authentication if (!string.IsNullOrEmpty(tenantId)) { var resource = "https://graph.microsoft.com"; + options.AuthorizationEndpoint = $"https://login.microsoftonline.com/{tenantId}/oauth2/authorize?resource={resource}"; options.TokenEndpoint = $"https://login.microsoftonline.com/{tenantId}/oauth2/token?resource={resource}"; }