Skip to content

New command: purview sensitivitylabel get #4423

@nicodecleyre

Description

@nicodecleyre

Usage

m365 purview sensitivitylabel get [options]

Description

Get a sensitivity label

Options

Option Description
-i, --id <id> The Id of the sensitivity label.
--userId [userId] User's Azure AD ID. Optionally specify this if you want to get a list of sensitivity labels that the user has access to. Specify either userId, userName but not both.
--userName [userName] User's UPN (user principal name, e.g. [email protected]). Optionally specify this if you want to get a list of sensitivity labels that the user has access to. Specify either userId, userName but not both.

Examples

Get a sensitivity label

m365 purview sensitivitylabel get --id 6f4fb2db-ecf4-4279-94ba-23d059bf157e

Default properties

No response

Additional Info

API request: https://learn.microsoft.com/en-us/graph/api/security-sensitivitylabel-get?view=graph-rest-beta

Let's also add this to the docs:

  • Attention: This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
  • Attention: When operating in app-only mode, you have the option to use either the userName or userId parameters to retrieve the sensitivity policy settings for a specific user. Without specifying either of these parameters, the command will retrieve the sensitivity policy settings for the currently authenticated user When operating in delegated mode.

Azure AD

We'll need the InformationProtectionPolicy.Read permission scope for this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions