Assign default web role when a user sign in Dynamics 365 Portals/ PowerApps portals

Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com
PowerApps portal – A simple yet powerful customer facing portal with so many inbuilt features. And these feature list are quite extensive. So it is really difficult to actually grasp all these features while working for a project. But at the same time, if you are not aware of these features then a requirement which could have been implemented so easily, you actually take a much more complex route to meet it.
And here was one of this requirement. The requirement is whenever a user sign in the portal, the user be assigned a default Web role. And when I see how it was implemented, I could find in many cases it is being done with Plugins or workflows.
Well trust me! There is much more easier way than you can imagine. And that is the concept of “Authenticated Users Role” in Web role. If you open up a Web Role, you will see this option as highlighted in the screenshot below


image
For example – In the above screenshot, I have set this option value to Yes for this Web role. So now what happens? Because I have set this to Yes, any user once they sign in will have this role automatically assigned to them. Because the option – Authenticated Users Role is set to Yes, there is no need to even explicitly assign this role to the portal contact. It automatically becomes the default role for all users who have signed in the portal.
Detailed explanation of this feature is provided here. Easy wasn’t it?
Hope this helps!
Debajit Dutta
(Business Solutions MVP)