Working to establish Azure AD system managed identity between APIS, I have defined a custom role for my target API in the manifest of the application.
"appRoles": [
{
"allowedMemberTypes": [
"Application"
],
"description": "Allow the application to read all things as itself.",
"displayName": "Read all things",
"id": "86a914fa-a862-4962-9975-be5c9a05dca3",
"isEnabled": true,
"lang": null,
"origin": "Application",
"value": "Things.Read.All"
}
Now I want to assign this role to my api that is going to call it so I can validate it in the access token received from AzureServiceTokenProvider. Problem is that I don't see the System Assigned identity in the app registration.
There is a button under Identity (Where System Assigned Identity is declared) 'Azure Role Assignments' which leads to Add Role assignment. There is a list of Roles available here. I was looking for the custom role I have defined, it is not in the drop down.
How to assign the defined role to the system identity so it can access the api or apis that it is allowed and no more? I expect to get this role in the access token. Is this the correct expectation?