Skip to content

New command: purview sensitivitylabel list #4424

@nicodecleyre

Description

@nicodecleyre

Usage

m365 purview sensitivitylabel list [options]

Description

Get a list of sensitivity labels

Options

Option Description
--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 list of retention labels

m365 purview sensitivitylabel list

Default properties

  • id
  • name
  • isActive

Additional Info

API request: https://learn.microsoft.com/en-us/graph/api/security-informationprotection-list-sensitivitylabels?view=graph-rest-beta&tabs=http

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 label for a specific user. Without specifying either of these parameters, the command will retrieve the sensitivity label 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