删除 acceptedSenderCreate acceptedSender

命名空间: microsoft 将新用户或组添加到 acceptedSender 列表中。Namespace: microsoft.graph Add a new user or group to the acceptedSender list.

在请求主体的 @odata.id 中指定用户或组。已接受的发件人列表中的用户可以发布到组对话。确保未在接受的发件人和拒绝的发件人列表中指定同一用户或组,否则会发生错误。Specify the user or group in @odata.id in the request body. Users in the accepted senders list can post to conversations of the group . Make sure you do not specify the same user or group in the accepted senders and rejected senders lists, otherwise you will get an error.

权限Permissions

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) Group.ReadWrite.AllGroup.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application 不支持。Not supported.

HTTP 请求HTTP request

POST /groups/{id}/acceptedSenders/$ref

请求标头Request headers

标头Header Value
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.

请求正文Request body

在请求正文中,提供 user 或 group 对象的 ID。In the request body, supply the id of a user or group object.

响应Response

此方法返回 204 No Content 响应代码,不返回任何响应正文。This method returns 204 No Content response code and no response body.

示例Example

请求Request

下面展示了示例请求。The following is an example of the request.

POST https://graph.microsoft.com/v1.0/groups/{id}/acceptedSenders/$ref
Content-type: application/json
Content-length: 30

{
  "@odata.id":"https://graph.microsoft.com/v1.0/users/alexd@contoso.com"
}

响应Response

下面展示了示例响应。The following is an example of the response.

HTTP/1.1 204 No Content