Skip to content

[BUG] Setting Sensitivity Label on a site with Sites.Selected #5267

@paylord

Description

@paylord

Reporting an Issue or Missing Feature

Unable to set site sensitivity label with Sites.Selected and Sites.Create.All.

Expected behavior

Apply a site sensitivity label

Actual behavior

Connecting using app-only auth with a certificate to an app registration having Sites.Create.All and Sites.Selected.
The site was created using a Graph API call and FullControl applied as a site app permission automatically. This is working fine for most other config settings.

Behaviour varies depending on calls used - see below.

Steps to reproduce behavior

Connect-PnPOnline -Url $siteUrl -Tenant $tenant -ClientID $clientID -Thumbprint $thumbprint
Set-PnPSiteSensitivityLabel -Identity
Attempted to perform an unauthorized operation.
Set-PnPSite -SensitivityLabel
No error - does nothing
Set-PnPSite -SensitivityLabel
Cannot bind parameter 'SensitivityLabel'. Cannot convert to type "System.Guid". Error: "unrecognized Guid format."

I get the same "unauthorized operation" error when trying to set StorageMaximumLevel and StorageWarningLevel but makes more sense that these are tenant properties. Though not sure how they can be set with Sites.Selected and FullControl?

What is the version of the Cmdlet module you are running?

Tried both:
3.10
3.1.329

Which operating system/environment are you running PnP PowerShell on?

  • Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions