I tried adding an index N on one of the Identity Roles but received an error.
{
"messages": [
{
"localeOrigin": "REQUEST",
"locale": "en-US",
"text": "The request was syntactically correct but its content is semantically invalid."
},
{
"localeOrigin": "DEFAULT",
"locale": "en-US",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"detailCode": "400.1 Bad request content",
"trackingId": "2213016e41524c70bec9e1cd4da285db"
}
And Content-type in Header should be application/json-patch+json
However, I noticed that this is still returning error (even when I used the body directly from SP document page) though it has worked several times in the past for me
{
"messages": [
{
"localeOrigin": "DEFAULT",
"locale": "en-US",
"text": "The request could not be parsed."
},
{
"localeOrigin": "REQUEST",
"locale": "en-US",
"text": "The request could not be parsed."
}
],
"detailCode": "400.0 Bad request syntax",
"trackingId": "2cbe449f8add46e0a7a2260763956fb6"
}
Not sure what am I missing and hoping someone in the community will be able to resolve this
The body you have provided is returning same error. However, you can use the below body to execute the patch operation successfully but the only catch is you have to provide the existing ids of the access profiles present in the role so that the new access profile will not overwrite the existing profiles.
Body:
[
{
“op”: “add”,
“path”: “/accessProfiles”,
“value”: [
{
“id”: “new profile_id”,
“type”: “ACCESS_PROFILE”
},
{
“id”: “old profile_id1”,
“type”: “ACCESS_PROFILE”
},
.
.
.
{
“id”: “old profile_idN”,
“type”: “ACCESS_PROFILE”
}
]
}
]