From 31fc64fb4c8a8b7aa0a33125420a9c67960109c2 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Tue, 19 Nov 2024 17:54:31 +0400 Subject: [PATCH] Update identity-azure-auth-service.ts --- .../identity-azure-auth/identity-azure-auth-service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/services/identity-azure-auth/identity-azure-auth-service.ts b/backend/src/services/identity-azure-auth/identity-azure-auth-service.ts index cc61df65f8..8607060a46 100644 --- a/backend/src/services/identity-azure-auth/identity-azure-auth-service.ts +++ b/backend/src/services/identity-azure-auth/identity-azure-auth-service.ts @@ -70,7 +70,9 @@ export const identityAzureAuthServiceFactory = ({ .map((servicePrincipalId) => servicePrincipalId.trim()) .some((servicePrincipalId) => servicePrincipalId === azureIdentity.oid); - if (!isServicePrincipalAllowed) throw new UnauthorizedError({ message: "Service principal not allowed" }); + if (!isServicePrincipalAllowed) { + throw new UnauthorizedError({ message: `Service principal '${azureIdentity.oid}' not allowed` }); + } } const identityAccessToken = await identityAzureAuthDAL.transaction(async (tx) => {