web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Retrieve the Roles assigned to current logged in user

(0) ShareShare
ReportReport
Posted on by 20

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.

  pastedimage1675965146208v4.png

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,126 Super User 2026 Season 1 on at

    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.

  • Gokulnath_March Profile Picture
    20 on at

    Hi Andre Arnaud de Calavon 

    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,

  • Martin Dráb Profile Picture
    239,140 Most Valuable Professional on at

    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.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    304,126 Super User 2026 Season 1 on at

    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. 

  • Gokulnath_March Profile Picture
    20 on at

    Hi @André Arnaud de Calavon ,

    Thank-you for your suggestions. , I can get the logged in user roles using 'SecurityUserRole' table.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 258 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans