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.

image

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.

image

Take the first guid after login.microsoftonline.com and use this value for the previously mentioned setting. The value will be in the format – https://login.windows.net/<guid>/.

image

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 www.xrmforyou.com or reach out to us at info@xrmforyou.com

Our product offerings:

Role based views for Dynamics 365 (http://www.xrmforyou.com/role-based-views.html)

CRM-Sharepoint Attachment uploader and metadata manager (http://www.xrmforyou.com/sharepoint-integrator.html)

Record Cloner for Dynamics 365 (http://www.xrmforyou.com/record-cloner.html)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s