• Thank you @Priyank Panchal for the solution that worked for you which you have mentioned in your comment. I am reposting the same solution with more elaboration so that other SO community members might benefit from it
.
When you want to call ‘Microsoft Graph API’ from a logic app with system managed identity enabled, then you must provide the following permissions to your system managed identity which is created as an enterprise application in your tenant’s Azure AD. Also, to provide specific permissions to Microsoft Graph API for this created enterprise application of the system managed identity, you will have to first ensure that you have the privilege of assigning roles to any identity created in your tenant/directory.
• And to get the privilege/authority of assigning roles-based control to any identity, you should have the built-in Azure AD role of ‘Privilege Role Administrator’ as it has the permissions of ‘microsoft.directory/roleAssignments/allProperties/allTasks’ and ‘microsoft.directory/roleDefinitions/allProperties/allTasks’ which enables it or authorizes it assign the required roles to any identity in that tenant.
The following are the permissions required for the managed identity enterprise application to assign to Microsoft Graph API for the above said purpose: -
You will need to assign application-based permissions to Microsoft Graph API as MS Graph API being an orchestrator application will execute the trigger-based tasks defined in logic apps workflow using the privileges acquired through the assignment of permissions in the managed identity enterprise application. Thus, the permissions required are ‘Application.ReadWrite.All, Directory.Read.All, User.Read.All, Policy.Read.All’ only to carry out the tasks through the logic app created.
• Once, the logic app and its workflow are created successfully with the configuration as below, then kindly change the audience for Microsoft Graph to ‘00000003-0000-0000-c000-000000000000’ in the ‘Authentication’ section as this is required correct value to be entered in there. Hence, when the configuration required for the logic app to work correctly is configured as stated until now, then the logic app workflow will surely work as expected.
