Get-PnPSensitivityLabel
SYNOPSIS
Gets the Microsoft Purview sensitivity labels that are available within the tenant
SYNTAX
Get-PnPSensitivityLabel [-Identity <Guid>] [-User <AzureADUserPipeBind>] [-Connection <PnPConnection>] [<CommonParameters>]
DESCRIPTION
This cmdlet allows retrieval of the available Microsoft Purview sensitivity labels in the currently connected tenant. You can retrieve all the labels, a specific label or all the labels available to a specific user.
EXAMPLES
EXAMPLE 1
Get-PnPSensitivityLabel
Returns all the Microsoft Purview sensitivitiy labels that exist on the tenant
EXAMPLE 2
Get-PnPSensitivityLabel -User johndoe@tenant.onmicrosoft.com
Returns all Microsoft Purview sensitivitiy labels which are available to the provided user
EXAMPLE 3
Get-PnPSensitivityLabel -Identity 47e66706-8627-4979-89f1-fa7afeba2884
Returns a specific Microsoft Purview sensitivitiy label by its id
PARAMETERS
-Identity
The Id of the Microsoft Purview sensitivity label to retrieve
Type: Guid
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-User
The UPN, Id or instance of an Azure AD user for which you would like to retrieve the Microsoft Purview sensitivity labels available to this user
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
RELATED LINKS
Microsoft 365 Patterns and Practices Microsoft Graph documentation