Automatically sign-in with Azure AD in PowerApps/ Dynamics 365 Portals on Sign in click.

Recently I had this requirement where the customer wanted to automatically sign in using the default Azure AD option on clicking Sing in the header menu in PowerApps portals.


So when the Sign In link is clicked, the user should be automatically signed in without being redirected to the Sign In page and then clicking on the Azure AD button.

It’s actually quite easy to do the same. And it can be accomplished using couple of site settings.

The first site setting is Authentication/Registration/LoginButtonAuthenticationType. To set the value of the site setting, we need to get the GUID of the identified.

Click on Azure AD button. And copy the URL from browser where you are being redirected to. The URL shall be in the format as shown in the below screenshot.


Take the first guid after and use this value for the previously mentioned setting. The value will be in the format –<guid>/.


Don’t forget to put the trailing slash after the GUID.

The next step is to basically check for another site setting – Authentication/Registration/ExternalLoginEnabled. If this site setting is not there, it’s fine. If it is there, set it to False or disable it.

Make sure you refresh the portal cache. Sometimes, to reflect authentication related settings, you may need to restart the portal as well to reflect it immediately.

Now once the user clicks on Sign in link, it automatically signs the user in with Azure AD.

Hope this helps!

Debajit Dutta

(Dynamics MVP)

For consultation/ corporate training visit or reach out to us at

Our product offerings:

Role based views for Dynamics 365 (

CRM-Sharepoint Attachment uploader and metadata manager (

Record Cloner for Dynamics 365 (