Forum Discussion
Inkey_Solutions
Aug 22, 2024Brass Contributor
Graph API permission issue to update Office 365 group settings via Application user(ClientId/Secret)
Hello Everyone,
I'm facing an issue updating the allowExternalSenders setting for a Microsoft 365 Group. I've tried various methods, including granting permissions of App to Groups and Directories, adding an App role, in the App and even assigning my App to the Azure Global Admin Security role, but nothing seems to be working. Does anyone have any suggestions or solutions for this problem?
below is the error.
Failed to update group settings: {"error":{"code":"ErrorGroupsAccessDenied","message":"User does not have permissions to execute this action.
- Not every operation is supported for application permissions, afaik this property can only be updated via delegate permissions. If you need to use application permissions, Exchange Online PowerShell or the (unsupported) /adminAPI endpoint might be an alternative
- Inkey_SolutionsBrass ContributorI have added some of the delegated permissions as well to this app. Also, Could you please give more details on the alternate ways?
- Delegate permissions work fine, check your token if you are still getting errors.
The alternative is to use the REST endpoint that the Exchange Online cmdlets use, the so-called /adminAPI. However, this method is not officially supported by Microsoft. You can find more details and examples here: https://www.michev.info/blog/post/3883/exchange-online-powershell-module-gets-rid-of-the-winrm-dependence