Skip to content

Commit f738ca2

Browse files
authored
Merge pull request #28612 from microsoftgraph/user/dluces/spe_remove_perm_assignlabel
Remove SPE permission block for driveItem: assignSensitivityLabel
2 parents 2d3f360 + 943bee2 commit f738ca2

2 files changed

Lines changed: 30 additions & 20 deletions

File tree

api-reference/beta/api/driveitem-assignsensitivitylabel.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@ author: "jaLuthra"
55
ms.localizationpriority: medium
66
ms.subservice: "onedrive"
77
doc_type: apiPageType
8-
ms.date: 04/05/2024
8+
ms.date: 04/09/2026
99
---
1010

1111
# driveItem: assignSensitivityLabel
1212
Namespace: microsoft.graph
1313

1414
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
1515

16-
Asynchronously assign a sensitivity label to a [driveItem][item-resource].
16+
Asynchronously assign a sensitivity label to a [driveItem][item-resource].
1717

18-
This API is part of the Microsoft SharePoint and OneDrive APIs that perform advanced premium administrative functions, and is considered a protected API. Protected APIs require you to have more validation, beyond permission and consent, before you can use them.
18+
This API is part of the Microsoft SharePoint and OneDrive APIs that perform advanced premium administrative functions, and is considered as protected. Protected APIs require you to have more validations, beyond permission and consent, before you can use them.
1919

20-
> [!NOTE]
21-
> This is a metered API and some charges for use may apply. For details, see [Overview of metered Microsoft 365 APIs in Microsoft Graph](/graph/metered-api-overview). Before you call this API, you must [Enable metered APIs and services in Microsoft Graph](/graph/metered-api-setup?tabs=azurecloudshell).
20+
For more information about sensitivity labels from an administrator's perspective, see [Enable sensitivity labels for Office files in SharePoint and OneDrive](/microsoft-365/compliance/sensitivity-labels-sharepoint-onedrive-files?view=o365-worldwide&preserve-view=true).
21+
22+
> [!NOTE]
23+
> This is a metered API and some charges for use may apply. For details, see [Overview of metered Microsoft 365 APIs in Microsoft Graph](/graph/metered-api-overview). Before you call this API, you must [Enable metered APIs and services in Microsoft Graph](/graph/metered-api-setup?tabs=azurecloudshell).
2224
2325
This API applies sensitivity labels to files at rest. Office clients don't apply watermarks, headers, or footers to files that contain the label information. For more information about sensitivity labels from an administrator's perspective, see [Enable sensitivity labels for Office files in SharePoint and OneDrive](/microsoft-365/compliance/sensitivity-labels-sharepoint-onedrive-files?view=o365-worldwide&preserve-view=true).
2426

@@ -30,7 +32,8 @@ Choose the permission or permissions marked as least privileged for this API. Us
3032
<!-- { "blockType": "permissions", "name": "driveitem_assignsensitivitylabel" } -->
3133
[!INCLUDE [permissions-table](../includes/permissions/driveitem-assignsensitivitylabel-permissions.md)]
3234

33-
[!INCLUDE [app-permissions](../includes/sharepoint-embedded-app-driveitem-permissions.md)]
35+
> [!NOTE]
36+
> This API isn't supported for Microsoft SharePoint Embedded containers.
3437
3538
## HTTP request
3639

@@ -71,7 +74,7 @@ If successful, the API returns a `202 Accepted` HTTP response code with an empty
7174
For more information about how to monitor the progress of an assign sensitivity label operation, see [monitoring long-running operations](/graph/long-running-actions-overview).
7275

7376
In addition to general errors that apply to Microsoft Graph, this API returns the `423 Locked` response code, which indicates that the file being accessed is locked. In such cases, the **code** property of the response object indicates the error type that blocks the operation.
74-
Also, Few Irm Protected sensitivity labels can't be updated by Application and need delegated user access to validate if the user has proper rights. For these scenarios, the API throws `Not Supported` response code.
77+
Also, some IRM Protected sensitivity labels can't be updated in app-only mode and need delegated user access to validate if the user has proper rights. For these scenarios, the API throws `Not Supported` response code.
7578

7679
The following table lists the possible values for the error types.
7780

@@ -117,10 +120,12 @@ The following example shows the response.
117120
HTTP/1.1 202 Accepted
118121
Location: https://contoso.sharepoint.com/_api/v2.0/monitor/QXNzaWduU2Vuc2l0aXZpdHlMYWJlbCxiMzc3ODY3OS04OWQ3LTRkYmYtYjg0MC1jYWM1NzRhY2FlNmE?tempAuth=eyJ0eXAiOiJKV1QiLCJhb....
119122
```
120-
The value of the `Location` header provides a URL for a service that will return the current state of the assign sensitivity label operation.
121-
You can use this information to [determine when the assign sensitivity label operation has finished](/graph/long-running-actions-overview).
123+
124+
The value of the `Location` header provides a URL for a service that will return the current state of the assignSensitivityLabel operation.
125+
You can use this information to [determine when the assignSensitivityLabel operation has finished](/graph/long-running-actions-overview).
122126

123127
### Remarks
124-
The response from the API only indicates that the assign sensitivity label operation was accepted or rejected. The operation might be rejected, for example, if the file type isn't supported, or the file is double encrypted.
128+
129+
The response from the API only indicates that the assignSensitivityLabel operation was accepted or rejected. The operation might be rejected, for example, if the file type isn't supported, or the file is double encrypted. Audit events for both success and failure cases are logged. For more information, see [Audit log activities](/purview/audit-log-activities#sensitivity-label-activities).
125130

126131
[item-resource]: ../resources/driveitem.md

api-reference/v1.0/api/driveitem-assignsensitivitylabel.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@ author: "abhishek-microsoft-2021"
55
ms.localizationpriority: medium
66
ms.subservice: "onedrive"
77
doc_type: apiPageType
8-
ms.date: 04/04/2024
8+
ms.date: 04/09/2026
99
---
1010

1111
# driveItem: assignSensitivityLabel
1212
Namespace: microsoft.graph
1313

1414
Asynchronously assign a sensitivity label to a [driveItem][item-resource].
1515

16-
This API is part of Microsoft SharePoint and OneDrive APIs that perform advanced premium administrative functions and is considered a protected API. Protected APIs require you to have additional validation, beyond permission and consent, before you can use them. Before you call this API, you must [Enable metered APIs and services in Microsoft Graph](/graph/metered-api-setup).
16+
This API is part of the Microsoft SharePoint and OneDrive APIs that perform advanced premium administrative functions, and is considered as protected. Protected APIs require you to have more validations, beyond permission and consent, before you can use them.
1717

1818
For more information about sensitivity labels from an administrator's perspective, see [Enable sensitivity labels for Office files in SharePoint and OneDrive](/microsoft-365/compliance/sensitivity-labels-sharepoint-onedrive-files?view=o365-worldwide&preserve-view=true).
1919

2020
> [!NOTE]
21-
> This is a metered API and some charges for use may apply. For details, see [Overview of metered Microsoft 365 APIs in Microsoft Graph](/graph/metered-api-overview).
21+
> This is a metered API and some charges for use may apply. For details, see [Overview of metered Microsoft 365 APIs in Microsoft Graph](/graph/metered-api-overview). Before you call this API, you must [Enable metered APIs and services in Microsoft Graph](/graph/metered-api-setup?tabs=azurecloudshell).
22+
23+
This API applies sensitivity labels to files at rest. Office clients don't apply watermarks, headers, or footers to files that contain the label information. For more information about sensitivity labels from an administrator's perspective, see [Enable sensitivity labels for Office files in SharePoint and OneDrive](/microsoft-365/compliance/sensitivity-labels-sharepoint-onedrive-files?view=o365-worldwide&preserve-view=true).
2224

2325
[!INCLUDE [national-cloud-support](../../includes/global-only.md)]
2426

@@ -28,7 +30,8 @@ Choose the permission or permissions marked as least privileged for this API. Us
2830
<!-- { "blockType": "permissions", "name": "driveitem_assignsensitivitylabel" } -->
2931
[!INCLUDE [permissions-table](../includes/permissions/driveitem-assignsensitivitylabel-permissions.md)]
3032

31-
[!INCLUDE [app-permissions](../includes/sharepoint-embedded-app-driveitem-permissions.md)]
33+
> [!NOTE]
34+
> This API isn't supported for Microsoft SharePoint Embedded containers.
3235
3336
## HTTP request
3437

@@ -66,10 +69,10 @@ In the request body, provide the ID for the sensitivity label that is to be assi
6669
## Response
6770

6871
If successful, the API returns a `202 Accepted` HTTP response code with an empty response body. The `Location` header provides the URL to get operation details.
69-
For more information about how to monitor the progress of an assign sensitivity label operation, see [monitoring long-running operations](/graph/long-running-actions-overview).
72+
For more information about how to monitor the progress of an assignSensitivityLabel operation, see [monitoring long-running operations](/graph/long-running-actions-overview).
7073

7174
In addition to general errors that apply to Microsoft Graph, this API returns the `423 Locked` response code, which indicates that the file being accessed is locked. In such cases, the **code** property of the response object indicates the error type that blocks the operation.
72-
Also, Few Irm Protected sensitivity labels can't be updated by Application and need delegated user access to validate if the user has proper rights, and for these scenarios the API returns a `Not Supported` response code.
75+
Also, some IRM Protected sensitivity labels can't be updated in app-only mode and need delegated user access to validate if the user has proper rights, and for these scenarios the API returns a `Not Supported` response code.
7376

7477
The following table lists the possible values for the error types.
7578

@@ -108,17 +111,19 @@ Content-Type: application/json
108111

109112
### Response
110113

111-
Here's is an example of the response.
114+
The following example shows the response.
112115

113116
<!-- { "blockType": "response" } -->
114117
```http
115118
HTTP/1.1 202 Accepted
116119
Location: https://contoso.sharepoint.com/_api/v2.0/monitor/QXNzaWduU2Vuc2l0aXZpdHlMYWJlbCxiMzc3ODY3OS04OWQ3LTRkYmYtYjg0MC1jYWM1NzRhY2FlNmE?tempAuth=eyJ0eXAiOiJKV1QiLCJhb....
117120
```
118-
The value of the `Location` header provides a URL for a service that returns the current state of the assign sensitivity label operation.
119-
You can use this information to [determine when the assign sensitivity label operation has finished](/graph/long-running-actions-overview).
121+
122+
The value of the `Location` header provides a URL for a service that returns the current state of the assignSensitivityLabel operation.
123+
You can use this information to [determine when the assignSensitivityLabel operation finishes](/graph/long-running-actions-overview).
120124

121125
### Remarks
122-
The response from the API only indicates that the assign sensitivity label operation was accepted or rejected. The operation might be rejected, for example, if the file type isn't supported, or the file is double encrypted. Audit events for both success and failure cases are logged. For more information, see [Audit log activities](/purview/audit-log-activities#sensitivity-label-activities).
126+
127+
The response from the API only indicates that the assignSensitivityLabel operation was accepted or rejected. The operation might be rejected, for example, if the file type isn't supported, or the file is double encrypted. Audit events for both success and failure cases are logged. For more information, see [Audit log activities](/purview/audit-log-activities#sensitivity-label-activities).
123128

124129
[item-resource]: ../resources/driveitem.md

0 commit comments

Comments
 (0)