-
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Hi!
I was trying to test SMTP2Graph in a very restricted company network and found out, that it is not possible to acquire the authority and token endpoints via the tenant name like it is done in Mailer.ts atm via
authority: `https://login.microsoftonline.com/${Config.clientTenant}.onmicrosoft.com`,
according to this error message in the log:
{"error":"endpoints_resolution_error: Endpoints cannot be resolved","filename":"nicmdqos5k6ey4co.eml","level":"error","message":"[MailQueue] Failed to send message \"nicmdqos5k6ey4co.eml\"","name":"ClientAuthError","stack":"ClientAuthError: endpoints_resolution_error: Endpoints cannot be resolved\n at os (dist/server.js:2:867462)\n at Br.createDiscoveredInstance (dist/server.js:2:934155)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async pa.value.f.clientId.auth.authority.buildOauthClientConfiguration (dist/server.js:2:991352)\n at async pa.value.f.clientId.auth.authority.acquireTokenByClientCredential (dist/server.js:2:1007400)\n at async dist/server.js:2:1006373","timestamp":"2024-06-27T11:47:57+02:00"}
In another, but commercial application running in this environment the vendor had to make the OAuth endpoints definable directly (aka via the tenant ID):
(anonymized)
OAuth 2.0 authorization endpoint (v2): https://login.microsoftonline.com/XXXXXXXX-BBBB-4019-KKKK-FFFFFFFFFFFF/oauth2/v2.0/authorize
OAuth 2.0 token endpoint (v2): https://login.microsoftonline.com/XXXXXXXX-BBBB-4019-KKKK-FFFFFFFFFFFF/oauth2/v2.0/token
Would this be possible here, too?
Regards,
Holger
Metadata
Metadata
Assignees
Labels
No labels