Skip to content

New command: Get a purview retention label #4146

@martinlingstuyl

Description

@martinlingstuyl

Usage

m365 purview retentionlabel get [options]

Description

Get a retention label

Options

Option Description
-i, --id <id> The Id of the retention label.

Examples

Get a retention label

m365 purview retentionlabel get --id c37d695e-d581-4ae9-82a0-9364eba4291e

Additional Info

The following Graph endpoint can be used:
https://graph.microsoft.com/beta/security/labels/retentionLabels/{id}

I initially had added a displayName option to get the retentionlabel by name, but $filter is not implemented as of yet, so I removed it again.

More information

Beta notice

The Graph endpoint that's used is in beta, so we should add a beta notice to the docs.

Azure AD

The command will need the Scope RecordsManagement.Read.All.

Try it out

You can try the endpoint by executing the following:

m365 request --url "https://graph.microsoft.com/beta/security/labels/retentionLabels/<someid>"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions