informationProtectionLabel: listLabels
命名空间:microsoft.graph
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
获取可供用户或组织使用 的信息保护标签 的集合。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | InformationProtectionPolicy.Read |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| 应用程序 | InformationProtectionPolicy.Read.All |
HTTP 请求
若要获取已登录用户或指定用户可用的标签,请执行以下操作:
GET /me/informationProtection/policy/labels
GET /users/{id | user-principal-name}/informationProtection/policy/labels
若要获取可供组织使用的标签,请执行以下操作:
GET /informationProtection/policy/labels
可选的查询参数
此方法支持一些 OData 查询参数来帮助自定义响应。 若要了解一般信息,请参阅 OData 查询参数。
请求标头
| 名称 | 说明 |
|---|---|
| Authorization | Bearer {token}。必需。 |
| User-Agent | 描述调用应用程序的名称和版本。 详细信息将在 Azure 信息保护分析中显示。 建议的格式为 ApplicationName/Version。 可选。 |
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在响应正文中返回 200 OK 响应代码和 informationProtectionLabel 对象的集合。
示例
请求
下面展示了示例请求。
GET https://graph.microsoft.com/beta/me/informationProtection/policy/labels
响应
下面展示了示例响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-type: application/json
User-agent: ContosoLOBApp/1.0
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('1e36d926-d716-4197-ba86-a6e18eb910b9')/informationProtection/policy/labels",
"value": [
{
"id": "3a80e051-487c-40d4-b491-73ad25d997e6",
"name": "General",
"description": "Consult Contoso data labeling policy for more details.",
"color": "",
"sensitivity": 1,
"tooltip": "Data classified as Contoso General.",
"isActive": true,
"parent": null
},
{
"id": "4662f9a3-dd50-4a20-b984-a7be82e0e79c",
"name": "Confidential",
"description": "Consult Contoso data labeling policy for more details.",
"color": "",
"sensitivity": 2,
"tooltip": "Data classificed as Contoso Confidential.",
"isActive": true,
"parent": null
},
{
"id": "4b18e8bb-b4a5-4695-85d0-8ae23ef27892",
"name": "Highly Confidential",
"description": "Consult Contoso data labeling policy for more details.",
"color": "",
"sensitivity": 3,
"tooltip": "Data classified as Contoso Highly Confidential.",
"isActive": true,
"parent": null
},
{
"id": "a20cbae4-0c05-448c-b342-cb6c618d0957",
"name": "Contoso Full Time Employees",
"description": "Consult Contoso data labeling policy for more details.",
"color": "",
"sensitivity": 4,
"tooltip": "Data classified as Contoso Highly Confidential for Contoso Full Time Employees",
"isActive": true,
"parent": {
"id": "4b18e8bb-b4a5-4695-85d0-8ae23ef27892",
"name": "Highly Confidential",
"description": "Consult Contoso data labeling policy for more details.",
"color": "",
"sensitivity": 3,
"tooltip": "Data classified as Contoso Highly Confidential.",
"isActive": true,
"parent": null
}
}
]
}
反馈
提交和查看相关反馈