Forum Discussion
Deploying custom roles to XMLA: TMSavePointValidation.cpp error
Hi jacovg91 ,
You can try modify the model permission for each role by changing the "modelPermission" field in the "role" object. For example, you can change the model permission from "read" to "all" to grant the role full access to the database.
You can also change the members of each role by modifying the "members" field in the "role" object. This field contains a list of objects, each of which specifies a member name and identity provider. You can add or remove members from this list as needed.
Here is an example of how the code you provided could be modified:
{
"sequence": {
"operations": [
{
"createOrReplace": {
"object": {
"database": "MY_DATABASE",
"role": "MY_ROLE1"
},
"role": {
"name": "MY_ROLE1",
"description": "MY_ROLE1 DESCRIPTION",
"modelPermission": "all",
"members": [
{
"memberName": "obj:MY_OBJECT_ID@MY_TENANT_ID",
"identityProvider": "AzureAD"
}
]
}
}
},
{
"createOrReplace": {
"object": {
"database": "MY_DATABASE",
"role": "MY_ROLE2"
},
"role": {
"name": "MY_ROLE2",
"description": "MY_ROLE2 DESCRIPTION",
"modelPermission": "all",
"members": [
{
"memberName": "obj:MY_OBJECT_ID@MY_TENANT_ID",
"identityProvider": "AzureAD"
}
]
}
}
}
]
}
}
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
So what does changing it to "all" really do, compared to "read"? It gives me the following error:
The JSON DDL request failed with the following error: <ccon>Cannot convert value 'all' to required type 'ModelPermission'. Check path 'modelPermission', line 15, position 39.</ccon>;<ccon>Requested value 'All' was not found.</ccon>.