I am trying to get O365 authentication working for an internal app. Because the app is not going to be used for multiple tenants, it is setup as single-tenant. When I try to use
anvil.microsoft.auth.login()
If produces an error saying:
Application <snip> is not configured as a multi-tenant application. Usage of the /common endpoint is not supported for such applications created after '10/15/2018'. Use a tenant-specific endpoint or configure the application to be multi-tenant.
How do I specify my tenant specific endpoint? Additionally, in the O365 app, what redirect URL should i be using?
Hi John,
Welcome to the forum! We’ve recently updated the Microsoft authentication system, and you’ll find that if you enter your tenant ID in the configuration window, you will authenticate against the correct AD tenant.
When creating your app in the Azure Portal, the redirect URL should be https://anvil.works/apps/_/microsoft_auth_callback
.
meredydd, thanks for the reply and the pointers. The new update to the Microsoft authentication system really helped. There are still a couple links in the docs that are missing. Hope those are coming soon.
I managed to get it working. Just a point of clarification for anyone who comes afterwards, the redirect URL should be:
https://anvil.works/apps/_/microsoft_auth_callback
Oops, thanks for the correction 
I’m new here, with the same problem. But here I found a beautiful information really. Which is helps me a lot to correct it.
Update for latecomers to this thread - we made a blog post about this process, and improved the documentation:
Using Microsoft authentication with Anvil
Thanks a lot guys, I’m really glad to see you.
1 Like