获取 personResponsibilityGet personResponsibility

命名空间:microsoft.graphNamespace: microsoft.graph

读取用户的配置文件中的personResponsibility对象的属性和关系。Read the properties and relationships of a personResponsibility object in a user's profile.

权限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) User. Read、User.readbasic.all、user. all、All、user. all。 AllUser.Read, User.ReadWrite, User.ReadBasic.All, User.Read.All, User.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) User. Read、User.readbasic.all、user. all、All、user. all。 AllUser.Read, User.ReadWrite, User.ReadBasic.All, User.Read.All, User.ReadWrite.All
应用程序Application User.readbasic.all、所有用户读写全部。 AllUser.ReadBasic.All, User.Read.All, User.ReadWrite.All

HTTP 请求HTTP request

GET /me/profile/responsibilities/{id}
GET /users/{id | userPrincipalName}/profile/responsibilities/{id}

可选的查询参数Optional query parameters

此方法支持 $select 查询参数。This method supports the $select query parameter. 指定要包含在响应中的属性的列表,并以逗号分隔。Specify a list of properties to include in the response, separating them by commas. 为获得最佳性能,请仅选择所需的属性子集。For optimal performance, only select the subset of properties needed.

请求标头Request headers

名称Name 说明Description
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.

请求正文Request body

请勿提供此方法的请求正文。Do not supply a request body for this method.

响应Response

如果成功,此方法 200 OK 在响应正文中返回响应代码和 personResponsibility 对象。If successful, this method returns a 200 OK response code and a personResponsibility object in the response body.

示例Examples

请求Request

GET https://graph.microsoft.com/beta/me/profile/responsibilities/0fb4c1e3-c1e3-0fb4-e3c1-b40fe3c1b40f

响应Response

注意: 为了提高可读性,可能缩短了此处显示的响应对象。Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "0fb4c1e3-c1e3-0fb4-e3c1-b40fe3c1b40f",
  "allowedAudiences": "organization",
  "inference": null,
  "createdDateTime": "2020-07-06T06:34:12.2294868Z",
  "createdBy": {
    "application": null,
    "device": null,
    "user": {
      "displayName": "Innocenty Popov",
      "id": "db789417-4ccb-41d1-a0a9-47b01a09ea49"
    }
  },
  "lastModifiedDateTime": "2020-07-06T06:34:12.2294868Z",
  "lastModifiedBy": {
    "application": null,
    "device": null,
    "user": {
      "displayName": "Innocenty Popov",
      "id": "db789417-4ccb-41d1-a0a9-47b01a09ea49"
    }
  },
  "source": null,
  "description": "Member of the Microsoft API Council",
  "displayName": "API Council",
  "webUrl": null,
  "collaborationTags": [
    "askMeAbout"
  ]
}