Attempting to add a permission to a role and I’m getting this error:
“System APIs may not be used:”
Why am I not allowed to use the system api for this when I can use it for everything else?
Attempting to add a permission to a role and I’m getting this error:
“System APIs may not be used:”
Why am I not allowed to use the system api for this when I can use it for everything else?
Welcome to the Community!
Are you using the Management API’s POST/api/v2/roles/{id}/permissions endpoint to add permissions to the role?
Would you mind sharing what your request looks like (removing any sensitive info) so that I can recreate the error? Thank you!
Hi Stephanie,
Thanks for responding.
I am using that api. The body of my message is:
{
“permissions”: [
{
“resource_server_identifier”: “my api identifier”,
“permission_name”: “Aperm”
}
]
}
and the error message:
{
"statusCode": 400,
"error": "Bad Request",
"message": "System APIs may not be used: My Api Identifier",
"errorCode": "operation_not_supported"
}
Thanks
Scott
Thank you for the additional info, @scott.david.walker. For the API Identifier, are you using the identifier for a custom API or the Management API (https://your-domain/api/v2)? You can only assign permissions to a role that belongs to a custom API because the Management API is not intended for direct use in the context of an end user.