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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to share datave...
Power Automate
Suggested Answer

Trying to share dataverse record using power automate

(2) ShareShare
ReportReport
Posted on by 4
Hello,
 
I would like to share dynamics 365 crm work order record with a specific team. For that I have created a power automate flow and there I used unbound action to grant access.
And I used the below json to share the record- 
 
{
"Principal": {
"teamid": "97c77852-bfd0-ee11-9078-6045bd143da8",
"@@odata.type": "Microsoft.Dynamics.CRM.team"
},
"AccessMask": "ReadAccess"
}
 
Once I tried to run the flow I am getting below error:
URL was not parsed due to an ODataUnrecognizedPathException. Resource not found for the segment '{ "Principal": { "teamid": "21e69e02-fd95-eb11-b1ac-000d3a6c4f7d", "@@odata.type": "Microsoft.Dynamics.CRM.team" }, "AccessMask": "ReadAccess" }' provided in the URL.
 
Please let me know if I am doing any mistake or missing any syntax.
 
Thanks,
I have the same question (0)
  • Suggested answer
    Valantis Profile Picture
    3,490 on at
     
    Two issues in your current JSON.
    First, you are missing the Target property. GrantAccess requires three parameters: Target (the record you are sharing), PrincipalAccess (wrapping both Principal and AccessMask together). Your JSON has Principal and AccessMask at the top level which is wrong.
    Second, the Principal and AccessMask must be nested inside a PrincipalAccess object, not directly in the body.
     
    The correct body format confirmed from Microsoft docs:
     
    {
      "Target": {
        "msdyn_workorderid": "YOUR-WORK-ORDER-GUID",
        "@odata.type": "Microsoft.Dynamics.CRM.msdyn_workorder"
      },
      "PrincipalAccess": {
        "Principal": {
          "teamid": "97c77852-bfd0-ee11-9078-6045bd143da8",
          "@odata.type": "Microsoft.Dynamics.CRM.team"
        },
        "AccessMask": "ReadAccess"
      }
    }
     
    In Power Automate with the Perform an unbound action step:
    - Action Name: GrantAccess
    - Then fill each parameter separately: Target, PrincipalAccess as individual fields, not as one raw JSON block
     
    If you are using the HTTP action directly against the Dataverse Web API instead, POST to:
    [OrgUrl]/api/data/v9.2/GrantAccess
    with the body above.
    Also note: use @odata.type not @@odata.type. Double @@ is incorrect.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 516

#2
Valantis Profile Picture

Valantis 477

#3
Vish WR Profile Picture

Vish WR 470

Last 30 days Overall leaderboard