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

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Security Role - System Table

(1) ShareShare
ReportReport
Posted on by 10
Hi

Anyone know why these roles:
 
Basic User
Delegate
Knowledge Manager
Support User
System Administrator
System Customizer

in the table Security Roles in dataverse are the only roles for which the unique identifier column Role is actually not the same across environments?

For every other role the values in that specific column is the same across environments.

The background for my question is that I want to manage our environments using terraform, however I will, for instance, have to query the basic user role each time I create a new environment instead of just using the same ID.

Link to the Terraform documentation on adding user to environments, along with security roles powerplatform_user (Resource) - Power Platform Terraform Provider

Br,
Asbjørn
I have the same question (0)
  • AmínAA Profile Picture
    1,197 Super User 2025 Season 2 on at
    Security Role - System Table
    I see . . . I’ll take a closer look at your specific use case and see if there’s a practical approach that helps. Ironically, I used Terraform on my latest project, so I’m not going in blind here. That being said, it might take a while hahaha!
     
    Best regards,
    Amín Abuhammadi Ajado
  • the other fleinert Profile Picture
    10 on at
    Security Role - System Table
    Hi @AmínAA

    Thanks for the answer. Although it doesn't help in my specific situation, it's nice to have an answer.

    If anyone stumbles across this post; the power platform provider for terraform needs the roleid for the security role as outlined in the documentation (as of version 3.8.0). powerplatform_user (Resource) - Power Platform Terraform Provider

    As I see it, the most forward way is to fetch the list of security roles after you create the environment and then get the role_id for the role that you need (assuming you need one of the roles mentioned previously). powerplatform_security_roles (Data Source) - Power Platform Terraform Provider

    If anyone finds a more straightforward solution, then please share it here.
  • Verified answer
    AmínAA Profile Picture
    1,197 Super User 2025 Season 2 on at
    Security Role - System Table
     
    It took me a while to figure this out. The reason those roles have different IDs is that in Dataverse the Role table is business-unit owned. The value you see in the roleid column is created per Business Unit, so the GUID varies by environment and Business Unit. That’s why built-in roles, don’t share the same ID across environments.

    For a stable identifier, use the Role Template (roletemplateid) rather than ID (roleid). You can find more details in Security roles and templates.

    If you find my response helpful, please give it a Thumbs Up. Should this answer resolve your question, kindly mark the post as Solved. Otherwise, feel free to reply, and I’ll be happy to provide further assistance.
    Connect with me if you feel like it! 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 1,043 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 348 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 345

Last 30 days Overall leaderboard

Featured topics