获取权限Get permission
命名空间:microsoft.graphNamespace: microsoft.graph
检索网站上 权限对象 的属性和关系。Retrieve the properties and relationships of a permission object on a site.
权限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) | 不支持。Not supported. |
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) | 不支持。Not supported. |
应用程序Application | Sites.FullControl.AllSites.FullControl.All |
HTTP 请求HTTP request
GET /sites/{sitesId}/permissions/{permissionId}
可选的查询参数Optional query parameters
此方法支持一些 OData 查询参数来帮助自定义响应。This method supports some of the OData query parameters to help customize the response. 若要了解一般信息,请参阅 OData 查询参数。For general information, see OData query parameters.
请求标头Request headers
名称Name | 说明Description |
---|---|
AuthorizationAuthorization | Bearer {token}。必需。Bearer {token}. Required. |
请求正文Request body
请勿提供此方法的请求正文。Do not supply a request body for this method.
响应Response
如果成功,此方法在响应 200 OK
正文中返回响应代码和权限对象。If successful, this method returns a 200 OK
response code and the permission object in the response body.
示例Examples
请求Request
GET https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions/{permissionId}
响应Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "1",
"roles": ["read"],
"grantedToIdentities": [{
"application": {
"id": "89ea5c94-7736-4e25-95ad-3fa95f62b66e",
"displayName": "Foo App"
}
}]
}