Labels - Bulk Set Labels
Set sensitivity labels on Fabric items, such as lakehouses and reports, by item ID. The sensitivity labels are applied to the autogenerated items related to the requested items, and their IDs aren't returned. Items with linked autogenerated items that are supported are: Lakehouse, Warehouse, Datamart, SQLDatabase and MirroredDatabase.
To set a sensitivity label using this API the admin user or the delegated user, if provided, must have the label included in their label policy. For a usage example see: Set or remove sensitivity labels.
Permissions
- The user must be a Fabric Administrator.
- The admin user and the delegated user, if provided, must have sufficient usage rights to set labels.
Required Scope
Tenant.ReadWrite.All
Limitations
- Maximum 25 requests per hour.
- Each request can update up to 2,000 Fabric items.
Microsoft Entra supported identities
This API supports the Microsoft identities listed in this section.
| Identity | Support |
|---|---|
| User | Yes |
| Service principal and Managed identities | No |
Interface
POST https://api.fabric.microsoft.com/v1/admin/items/bulkSetLabels
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| items | True |
Item |
A list of items. The list includes item ID and type. |
| labelId | True |
string (uuid) |
The label ID, which must be in the user's label policy. |
| assignmentMethod |
Specifies whether the assigned label was set by an automated process or manually. Additional tenant setting property types may be added over time. |
||
| delegatedPrincipal | Principal: |
Delegated user details. A delegated user is a user within an organization whose admin sets a label on behalf of the user. Although the admin sets the label, the delegated user is marked as the label issuer. Only principals of type 'User' are supported. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Request completed successfully. |
|
| 429 Too Many Requests |
The service rate limit was exceeded. The server returns a Headers Retry-After: integer |
|
| Other Status Codes |
Common error codes:
|
Examples
Set labels example
Sample request
POST https://api.fabric.microsoft.com/v1/admin/items/bulkSetLabels
{
"items": [
{
"id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a",
"type": "Dashboard"
},
{
"id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b",
"type": "Dashboard"
},
{
"id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c",
"type": "Report"
},
{
"id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e",
"type": "SemanticModel"
},
{
"id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8f",
"type": "Notebook"
}
],
"labelId": "fe472f5e-636e-4c10-a1c6-7e9edc0b542d",
"assignmentMethod": "Standard",
"delegatedPrincipal": {
"id": "796ce6ad-9163-4c16-9559-c68192a251de",
"type": "User"
}
}
Sample response
{
"itemsChangeLabelStatus": [
{
"id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a",
"type": "Dashboard",
"status": "NotFound"
},
{
"id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b",
"type": "Dashboard",
"status": "Failed"
},
{
"id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c",
"type": "Report",
"status": "Succeeded"
},
{
"id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e",
"type": "SemanticModel",
"status": "InsufficientUsageRights"
},
{
"id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8f",
"type": "Notebook",
"status": "FailedToGetUsageRights"
}
]
}
Definitions
| Name | Description |
|---|---|
|
Assignment |
Specifies whether the assigned label was set by an automated process or manually. Additional tenant setting property types may be added over time. |
|
Entire |
Represents a tenant principal |
|
Error |
The error related resource details object. |
|
Error |
The error response. |
|
Error |
The error response details. |
|
Group |
Group specific details. Applicable when the principal type is |
|
Group |
Represents a security group. |
|
Group |
The type of the group. Additional group types may be added over time. |
|
Item |
The unique ID and information protection label change status of a Fabric item |
|
Item |
The item information, including item ID and type. |
|
Items |
A list of the unique IDs and information protection label change status of the Fabric items in the label change request. |
|
Item |
The type of the item. Additional item types may be added over time. |
|
Principal |
The type of the principal. Additional principal types may be added over time. |
|
Service |
Service principal specific details. Applicable when the principal type is |
|
Service |
Represents a Microsoft Entra service principal. |
|
Service |
Service principal profile details. Applicable when the principal type is |
|
Service |
Represents a service principal profile. |
|
Set |
A composite of label information required to update an information protection label. |
| Status |
The status of an information protection label change operation. Additional tenant setting property types may be added over time. |
|
User |
User principal specific details. Applicable when the principal type is |
|
User |
Represents a Microsoft Entra user principal. |
AssignmentMethod
Specifies whether the assigned label was set by an automated process or manually. Additional tenant setting property types may be added over time.
| Value | Description |
|---|---|
| Standard |
The label was set by an automated process (default value). |
| Priviledged |
The label was set manually. |
EntireTenantPrincipal
Represents a tenant principal
| Name | Type | Description |
|---|---|---|
| displayName |
string |
The principal's display name. |
| id |
string (uuid) |
The principal's ID. |
| type |
string:
Entire |
The type of the principal. Additional principal types may be added over time. |
ErrorRelatedResource
The error related resource details object.
| Name | Type | Description |
|---|---|---|
| resourceId |
string |
The resource ID that's involved in the error. |
| resourceType |
string |
The type of the resource that's involved in the error. |
ErrorResponse
The error response.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
| message |
string |
A human readable representation of the error. |
| moreDetails |
List of additional error details. |
|
| relatedResource |
The error related resource details. |
|
| requestId |
string (uuid) |
ID of the request associated with the error. |
ErrorResponseDetails
The error response details.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
| message |
string |
A human readable representation of the error. |
| relatedResource |
The error related resource details. |
GroupDetails
Group specific details. Applicable when the principal type is Group.
| Name | Type | Description |
|---|---|---|
| groupType |
The type of the group. Additional group types may be added over time. |
GroupPrincipal
Represents a security group.
| Name | Type | Description |
|---|---|---|
| displayName |
string |
The principal's display name. |
| groupDetails |
Group specific details. Applicable when the principal type is |
|
| id |
string (uuid) |
The principal's ID. |
| type |
string:
Group |
The type of the principal. Additional principal types may be added over time. |
GroupType
The type of the group. Additional group types may be added over time.
| Value | Description |
|---|---|
| Unknown |
Principal group type is unknown. |
| SecurityGroup |
Principal is a security group. |
| DistributionList |
Principal is a distribution list. |
ItemChangeLabelStatus
The unique ID and information protection label change status of a Fabric item
| Name | Type | Description |
|---|---|---|
| id |
string |
The unique ID of a Fabric item. The ID is in UUID format. |
| status |
The status of an information protection label change operation. Additional tenant setting property types may be added over time. |
|
| type |
The Fabric item type. |
ItemInfo
The item information, including item ID and type.
| Name | Type | Description |
|---|---|---|
| id |
string (uuid) |
An ID in UUID format. |
| type |
The item type. |
ItemsChangeLabelResponse
A list of the unique IDs and information protection label change status of the Fabric items in the label change request.
| Name | Type | Description |
|---|---|---|
| itemsChangeLabelStatus |
A list of items change label status. |
ItemType
The type of the item. Additional item types may be added over time.
| Value | Description |
|---|---|
| Dashboard |
PowerBI dashboard. |
| Report |
PowerBI report. |
| SemanticModel |
PowerBI semantic model. |
| PaginatedReport |
PowerBI paginated report. |
| Datamart |
PowerBI datamart. |
| Lakehouse |
A lakehouse. |
| Eventhouse |
An eventhouse. |
| Environment |
An environment. |
| KQLDatabase |
A KQL database. |
| KQLQueryset |
A KQL queryset. |
| KQLDashboard |
A KQL dashboard. |
| DataPipeline |
A data pipeline. |
| Notebook |
A notebook. |
| SparkJobDefinition |
A spark job definition. |
| MLExperiment |
A machine learning experiment. |
| MLModel |
A machine learning model. |
| Warehouse |
A warehouse. |
| Eventstream |
An eventstream. |
| SQLEndpoint |
An SQL endpoint. |
| MirroredWarehouse |
A mirrored warehouse. |
| MirroredDatabase |
A mirrored database. |
| Reflex |
A Reflex. |
| GraphQLApi |
An API for GraphQL item. |
| MountedDataFactory |
A MountedDataFactory. |
| SQLDatabase |
A SQLDatabase. |
| CopyJob |
A Copy job. |
| VariableLibrary |
A VariableLibrary. |
| Dataflow |
A Dataflow. |
| ApacheAirflowJob |
An ApacheAirflowJob. |
| WarehouseSnapshot |
A Warehouse snapshot. |
| DigitalTwinBuilder |
A DigitalTwinBuilder. |
| DigitalTwinBuilderFlow |
A Digital Twin Builder Flow. |
| MirroredAzureDatabricksCatalog |
A mirrored azure databricks catalog. |
| Map |
A Map. |
| AnomalyDetector |
An Anomaly Detector. |
| UserDataFunction |
A User Data Function. |
| GraphModel |
A GraphModel. |
| GraphQuerySet |
A Graph QuerySet. |
| SnowflakeDatabase |
A Snowflake Database to store Iceberg tables created from Snowflake account. |
| OperationsAgent |
A OperationsAgent. |
| CosmosDBDatabase |
A Cosmos DB Database. |
| Ontology |
An Ontology. |
| EventSchemaSet |
An EventSchemaSet. |
| DataAgent |
A DataAgent. |
PrincipalType
The type of the principal. Additional principal types may be added over time.
| Value | Description |
|---|---|
| User |
Principal is a Microsoft Entra user principal. |
| ServicePrincipal |
Principal is a Microsoft Entra service principal. |
| Group |
Principal is a security group. |
| ServicePrincipalProfile |
Principal is a service principal profile. |
| EntireTenant |
Principal represents all tenant users. |
ServicePrincipalDetails
Service principal specific details. Applicable when the principal type is ServicePrincipal.
| Name | Type | Description |
|---|---|---|
| aadAppId |
string (uuid) |
The service principal's Microsoft Entra AppId. |
ServicePrincipalPrincipal
Represents a Microsoft Entra service principal.
| Name | Type | Description |
|---|---|---|
| displayName |
string |
The principal's display name. |
| id |
string (uuid) |
The principal's ID. |
| servicePrincipalDetails |
Service principal specific details. Applicable when the principal type is |
|
| type |
string:
Service |
The type of the principal. Additional principal types may be added over time. |
ServicePrincipalProfileDetails
Service principal profile details. Applicable when the principal type is ServicePrincipalProfile.
| Name | Type | Description |
|---|---|---|
| parentPrincipal | Principal: |
The service principal profile's parent principal. |
ServicePrincipalProfilePrincipal
Represents a service principal profile.
| Name | Type | Description |
|---|---|---|
| displayName |
string |
The principal's display name. |
| id |
string (uuid) |
The principal's ID. |
| servicePrincipalProfileDetails |
Service principal profile details. Applicable when the principal type is |
|
| type |
string:
Service |
The type of the principal. Additional principal types may be added over time. |
SetLabelsRequest
A composite of label information required to update an information protection label.
| Name | Type | Description |
|---|---|---|
| assignmentMethod |
Specifies whether the assigned label was set by an automated process or manually. Additional tenant setting property types may be added over time. |
|
| delegatedPrincipal | Principal: |
Delegated user details. A delegated user is a user within an organization whose admin sets a label on behalf of the user. Although the admin sets the label, the delegated user is marked as the label issuer. Only principals of type 'User' are supported. |
| items |
Item |
A list of items. The list includes item ID and type. |
| labelId |
string (uuid) |
The label ID, which must be in the user's label policy. |
Status
The status of an information protection label change operation. Additional tenant setting property types may be added over time.
| Value | Description |
|---|---|
| Failed |
Failed to set a new label. Please retry. |
| FailedToGetUsageRights |
Failed to set a new label. The Fabric item has a sensitivity label with protection settings, and Fabric was unable to verify that the user has sufficient usage rights to change the label. |
| InsufficientUsageRights |
Failed to set a new label. The Fabric item has a sensitivity label with protection settings, and the admin user (and the delegated user, if provided) doesn't have sufficient usage rights to change the label. |
| NotFound |
The Fabric item ID, label or type wasn't found. |
| Succeeded |
The Fabric item label was changed. |
UserDetails
User principal specific details. Applicable when the principal type is User.
| Name | Type | Description |
|---|---|---|
| userPrincipalName |
string |
The user principal name. |
UserPrincipal
Represents a Microsoft Entra user principal.
| Name | Type | Description |
|---|---|---|
| displayName |
string |
The principal's display name. |
| id |
string (uuid) |
The principal's ID. |
| type |
string:
User |
The type of the principal. Additional principal types may be added over time. |
| userDetails |
User principal specific details. Applicable when the principal type is |