Sensitivity label cannot be assigned since provided sensitivity label is not available or supported.

Sandeep Y 0 Reputation points
2024-09-26T19:02:38.06+00:00

Hello,

When using the assignSensitivityLabel API call to assign an existing sensitivity label to a target file, I am getting an HTTP 400 response with the following error:

The label definitely exists and I use the ID as provided by the sensitivityLabels retrieval API endpoint.

What am I doing wrong?

{'error': {'code': 'invalidRequest',
  'message': 'Sensitivity label cannot be assigned since provided sensitivity label is not available or supported.',
  'innerError': {'code': 'badArgument',
   'date': '2024-09-26T18:46:35',
   'request-id': 'a06824da-0daf-4110-96b5-256744ced329',
   'client-request-id': 'a06824da-0daf-4110-96b5-256744ced329'}}}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,943 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,099 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 4,555 Reputation points Microsoft Vendor
    2024-09-27T06:28:39.0266667+00:00

    Hi @Sandeep Y

    According to your error message, check the related documents. The error may be caused by the following conditions:

    1.According to the documentation, there are several file types that support adding sensitivity labels. Please check whether your file is supported.

    User's image

    2.According to the documentation, it is also not possible to add sensiticity labels to your files when they are protected.

    User's image

    3.Finally, it's worth checking if you have sensitivity tags enabled for SharePoing and OneDrive.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.