I have an application that needs to create AD groups and update their memberships via Graph API. I'll be using a service principal to do so.
I'm trying to understand the difference between:
- assigning the service principal to an Azure AD role (for example, "User Administrator": https://docs.microsoft.com/en-us/azure/active-directory/roles/delegate-by-task#groups)
- adding API permissions to the service principal (for example, Microsoft Graph API's "Group.ReadWrite.All": https://docs.microsoft.com/en-us/azure/active-directory/roles/delegate-by-task#groups)
What are the differences here? Do they both effectively give the same permissions?