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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Question about Dataverse Web API

(3) ShareShare
ReportReport
Posted on by 21

I would like to know if it's possible to retrieve the access permissions (such as CRUD operations) for users or teams that are associated with a specific record using the Dataverse Web API?

 

Thank you in advance for your help!

I have the same question (0)
  • Verified answer
    Holly Huffman Profile Picture
    6,530 Super User 2025 Season 2 on at
    Good morning, afternoon, or evening depending on your location!
     
    Yes, it is possible to retrieve access permissions for users or teams associated with a specific record using the Dataverse Web API. Here's how you can approach this:
    1. RetrievePrincipalAccess Message:
      The Dataverse Web API provides the RetrievePrincipalAccess message, which allows you to retrieve the access rights (CRUD operations) that a user, team, or organization has for a specific record. You can use this message to check permissions for a given principal (user or team) and target record.
      Example request:
      POST [Organization Uri]/api/data/v9.2/RetrievePrincipalAccess
      Content-Type: application/json
      Authorization: Bearer [Access Token]

      {
          "Principal": {
              "@odata.type": "Microsoft.Dynamics.CRM.systemuser",
              "systemuserid": "[User ID]"
          },
          "Target": {
              "@odata.type": "Microsoft.Dynamics.CRM.account",
              "accountid": "[Record ID]"
          }
      }
    2. AccessRights Enum:
      The response will include the access rights for the specified record, such as Read, Write, Delete, etc., based on the user's or team's security role and field-level security.
    3. Security Role Evaluation:
      If you need to evaluate permissions at a broader level (e.g., for a table rather than a specific record), you can query the user's security roles and privileges using the Web API.
    4. Testing and Validation:
      Ensure that the user or team has the necessary permissions configured in Dataverse. You can also test the API calls in tools like Postman or through custom code.
     
    Hope this helps some!
  • 陸森-23041036-0 Profile Picture
    21 on at
    Thank you for the information about using RetrievePrincipalAccess to get permissions for specific users/teams on a record. This solved my initial question!
    Question 1: Retrieving User/Team Access Rights for a Specific Record
    Is it possible to retrieve a list of all users and teams that have access rights to a specific record using the Dataverse Web API?
    My goal is to display a list of users/teams with access to a record on the record's detail page, showing what kind of permissions (read, write, delete, etc.) each user/team has.
    Question 2: Bulk Sharing Records with Multiple Users/Teams
    Is it possible to share multiple records with multiple users/teams in bulk using the Dataverse Web API?
    I know this can be done manually through the sharing dialog in the UI, but I'd like to implement a solution that allows bulk sharing from a view/list page. I'm open to using Power Automate with custom connectors or Premium connectors if that's a viable approach.
    Thank you for your assistance!
    発明アイデア-情報-スマートビ...

    Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at
    Don't bother talking to Holly, she's apparently just an AI bot.
     
    I see you have another thread for your new question. Discussing the same thing at two places in parallel would be a waste of time, therefore let's add a link to the right thread that people should use: Question about Dataverse Web API. Alternatively, delete the duplicate thread and continue the discussion here.
     
    By the way, please give each thread describing the particular topic. Giving all questions about the same feature the same vague title (Question about...) makes the forum harder to navigate and the threads harder to understand.
     
    Also, your question is about Dataverse, not Dynamics, therefore a better place for it would be Power Apps - Microsoft Dataverse forum in Power Platform Community.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans