mirror of
https://github.com/outline/outline.git
synced 2026-11-22 14:01:41 +03:00
Improved error handling for Azure auth, add default value for AZURE_RESOURCE_ID
This commit is contained in:
1 parent
b6fc8fb4b1
commit
da4cd4ebcd
2 files changed
+5
-5
No files matched your search
@@ -69,9 +69,9 @@ if (env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET) {
|
||||
);
|
||||
}
|
||||
|
||||
if (!organizationResponse) {
|
||||
if (!organizationResponse?.value?.length) {
|
||||
throw MicrosoftGraphError(
|
||||
"Unable to load organization info from Microsoft Graph API"
|
||||
`Unable to load organization info from Microsoft Graph API: ${organizationResponse.error?.message}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ class AzurePluginEnvironment extends Environment {
|
||||
|
||||
@IsOptional()
|
||||
@CannotUseWithout("AZURE_CLIENT_ID")
|
||||
public AZURE_RESOURCE_APP_ID = this.toOptionalString(
|
||||
environment.AZURE_RESOURCE_APP_ID
|
||||
);
|
||||
public AZURE_RESOURCE_APP_ID =
|
||||
this.toOptionalString(environment.AZURE_RESOURCE_APP_ID) ??
|
||||
"00000003-0000-0000-c000-000000000000";
|
||||
|
||||
@IsOptional()
|
||||
@CannotUseWithout("AZURE_CLIENT_ID")
|
||||
|
||||
Reference in new issue
Block a user