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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to set depth of RolePrivilege entity

(0) ShareShare
ReportReport
Posted on by 5

Hi,

I'm trying to create a Role with Microsoft CDS web api, but I don't know how to set its privilege levels. I mean, I can create the role and assign privileges to it, but their level/depth is set to 0 (User).

I've tried updating the privilegedepthmask property of the RolePrivilege entity, but I get the following error in the response:

{
    "error": {
        "code": "0x80040800",
        "message": "The 'Update' method does not support entities of type 'roleprivileges'."
    }
}

When creating the role, I assign the privileges like this:

{
    "businessunitid@odata.bind": "/businessunits(6efad0b7-160b-eb11-a812-000d3ab2a6be)",
    "name": "Security Role Test",
    "roleprivileges_association@odata.bind": [
        "/privileges(2493b394-f9d7-4604-a6cb-13e1f240450d)",
        "/privileges(707e9700-19ed-4cba-be06-9d7f6e845383)",
        "/privileges(e62439f6-3666-4c0a-a732-bde205d8e938)",
        "/privileges(e3f45b8e-4872-4bb5-8b84-01ee8f9c9da1)",
        "/privileges(f36ff7e9-72b9-4882-afb6-f947de984f72)",
        "/privileges(886b280c-6396-4d56-a0a3-2c1b0a50ceb0)"
    ]
}

Is there a way to set the privilege depth via the web api? Thanks!

I have the same question (0)
  • Suggested answer
    Yiming Profile Picture
    Microsoft Employee on at

    Hi,

    Please check the below documentation and see if it helps:

    docs.microsoft.com/.../microsoft.crm.sdk.messages.privilegedepth

  • Pedro Rosa Profile Picture
    5 on at

    Thanks for the reply Yiming I'm using the Web API. That document states:

    "For the Web API use the PrivilegeDepth EnumType."

    But it doesn't say how to update it. Which endpoint should I use for that purpose, do you know?

  • Malvtrics Profile Picture
    Microsoft Employee on at
    I have encountered the same issue, have you successfully resolve 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

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 > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 165

#2
ManoVerse Profile Picture

ManoVerse 156 Super User 2026 Season 1

#3
Zhilan Profile Picture

Zhilan 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans