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!