T
Twenty3mo ago
Farrit

✅ Trying to implement Microsoft Auth on self-hosted server, but getting page not found error

Hi! So my group is trying to implement microsoft authentication on a self hosted twenty instance, and we finally got through all the ID and api clearing, but now we're getting 404 page not found errors.
CALENDAR_PROVIDER_MICROSOFT_ENABLED=TRUE
MESSAGING_PROVIDER_MICROSOFT_ENABLED=TRUE
AUTH_MICROSOFT_ENABLED=TRUE
AUTH_MICROSOFT_CLIENT_ID="my-client-id"
AUTH_MICROSOFT_CLIENT_SECRET="my-client-secret"
AUTH_MICROSOFT_CALLBACK_URL=https://<my-domain.com>/auth/microsoft/redirect
AUTH_MICROSOFT_APIS_CALLBACK_URL=https://<my-domain.com>/auth/microsoft-apis/get-access-token
CALENDAR_PROVIDER_MICROSOFT_ENABLED=TRUE
MESSAGING_PROVIDER_MICROSOFT_ENABLED=TRUE
AUTH_MICROSOFT_ENABLED=TRUE
AUTH_MICROSOFT_CLIENT_ID="my-client-id"
AUTH_MICROSOFT_CLIENT_SECRET="my-client-secret"
AUTH_MICROSOFT_CALLBACK_URL=https://<my-domain.com>/auth/microsoft/redirect
AUTH_MICROSOFT_APIS_CALLBACK_URL=https://<my-domain.com>/auth/microsoft-apis/get-access-token
We've been trying a bunch of configurations for a few hours now, and I'm completely lost. This should point back to our server instance, correct? My self hosted instance is also behind a reverse-proxy using caddy/cloudflare.
No description
No description
No description
5 Replies
ɃØĦɆᵾS
ɃØĦɆᵾS3mo ago
@Guillaume could you take a look in free time?
BigKahuna
BigKahuna3mo ago
@Farrit Not an expert yet myself, but I originally also had issues because I forgot to actually add the AUTH_MICROSOFT_APIS_CALLBACK_URL (in addition to AUTH_MICROSOFT_CALLBACK_URL) in my entra / Azure app. But from what you're saying, that's probably not it ...
Farrit
FarritOP3mo ago
I am sorry for the lqck of update! We figured it out on a late night teams session, it turns out we needed to have the url's directed at my personal domain (as that's what the CRM is currently pointed at) as opposed to our company's domain. I felt really stupid once I figured it out, but it is working now and fully functional!
ɃØĦɆᵾS
ɃØĦɆᵾS3mo ago
Good for you that you managed to solve the problem on your own!
Guillaume
Guillaume3mo ago
Glad to read that ! Sorry I did not answer earlier

Did you find this page helpful?