I am building an application which uses role based access and have created custom app roles in Azure App Registration and have also assigned some users with roles in Enterprise Application. My Question is, can we do the removal & assignment of these custom app role to users via the application instead of using Azure?
I've tried using Microsoft Graph API to solve this problem. In the frontend(React) I was making Graph API calls to achieve this & is working fine. But it requires "AppRoleAssignment.ReadWrite.All" permission to be enabled which seems so high level for the task I'm doing since it can assign any roles(custom or AAD roles) to any users, application and doesn't feel secure to give this scope to my end users even though only admin role would be performing this task. Is there any better way to implement this. Also is there a way to assign one of the custom roles as default to new users?. Appreciate the help!