public string GetAuthorizationEndpoint(string tenantId) { if (!AuthorizationEndpoint.Contains("/common/")) { throw new InvalidOperationException("Invalid authorization_endpoint: " + AuthorizationEndpoint); } return(String.IsNullOrEmpty(tenantId) ? AuthorizationEndpoint : AuthorizationEndpoint.Replace("/common/", String.Format("/{0}/", tenantId))); }
public string GetAuthorizationEndpoint(string tenantId) { // ADFS URLs may not contain /common/. Replace /common/ with tenantID only if /common/ is present. return(String.IsNullOrEmpty(tenantId) ? AuthorizationEndpoint : AuthorizationEndpoint.Replace("/common/", String.Format("/{0}/", tenantId))); }