Hi all,
We are creating Canvas Apps using D365 Fin & Ops entity as a data source. We need to retrieve the Roles assigned to current logged in user. Below is the screenshot of D365 Fin & Ops User and Role association. Please suggest.
Hi all,
We are creating Canvas Apps using D365 Fin & Ops entity as a data source. We need to retrieve the Roles assigned to current logged in user. Below is the screenshot of D365 Fin & Ops User and Role association. Please suggest.
Hi @André Arnaud de Calavon ,
Thank-you for your suggestions. , I can get the logged in user roles using 'SecurityUserRole' table.
Hi Gokulnath,
This is fully different from what I did with my app. I would suggest using the standard security options from Power Apps for this purpose. Design - Securing the app and data - Power Apps | Microsoft Learn
If you insist building your own security framework, you will need to find the user and the roles using the entities SystemUser and SecurityUserRole.
There are several ways how to do it. For example, there is a custom service for this purpose (SysUserManagement: getRolesForUser). And you can utilize UserSessionService to get the current user ID, if you don't know it.
Thank- you for your response. We are not embedding the app within the Dynamics 365 F&O.
It's the standalone Mobile app. (Canvas app) where we need to hide/show the screens and buttons based on current logged in user Roles.
Thanks,
Hi Gokulnath,
For an internal demo, I created a canvas app this week having the security role assignments per user with additional information like assignment mode and license type. I would be happy to share my knowledge. Can you tell if you want to embed the app within Dynamics 365 F&O or would it be a stand alone app which should recognize the user? Please share the exact requirements for your app.
Abhilash Warrier
565
Martin Dráb
536
Most Valuable Professional
André Arnaud de Cal...
402
Super User 2025 Season 1