ErrorGroupsAccessDenied when setting hideFromAddressLists or hideFromOutlookClients

点点圈 提交于 2020-06-23 08:49:27

问题


I have been trying to set the following values on a group using graph using the beta API:

{
  "hideFromOutlookClients":  true,
  "hideFromAddressLists":  true
}

However, I get the following error:

{ 
  "code": "ErrorGroupsAccessDenied", 
  "message": "User does not have permissions to execute this action."
}

The application does have the required permissions for updating a Group, in fact, updating a group's description works just fine. These two properties were added a few months back but they seem to require different permission. I cannot find any other "group" related permission to assign.

Has anyone used these properties before that could shed some light on the subject?


回答1:


I have tested your scene.

To update "hideFromOutlookClients" and "hideFromAddressLists", we have to assign Group.ReadWrite.All Delegated Permission.

The other two Delegated Permissions Directory.ReadWrite.All and Directory.AccessAsUser.All don't work. (But these two permissions work for updating "description")

The beta version of Microsoft Graph API is continuously improving, so there may be some unexpected issues.


UPDATE:

You are using Application permissions rather than Delegated permissions. Unfortunately, Application permissions are not supported currently based on my test. You need to assign Group.ReadWrite.All Delegated Permission and call this API on behalf of a user.



来源:https://stackoverflow.com/questions/59160848/errorgroupsaccessdenied-when-setting-hidefromaddresslists-or-hidefromoutlookclie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!