Skip to content

[BUG] get-pnpretentionlabel on a list is giving a warning that there is no label found for the list despite one being set #5118

@warrenstark

Description

@warrenstark

Reporting an Issue or Missing Feature

When using get-pnpretentionlabel for a list it will consistently return that there is no label found for the specified list/library.

Set-pnpretentionlabel and reset-pnpretentionlabel both work for the same library.

Expected behavior

I expect that after I set via set-pnpretentionlabel or via sharepoint library page that I would be able to see the default label I set returned.

Actual behavior

Example behaviour

connect-pnponline -url $siteurl -ClientId $clientid -CertificateBase64Encoded $encodedpf -tenantname $tenantname

---- currently, no label exists on the library
get-pnpretentionLabel -List "Legacy VC Interop Library"
WARNING: No label found for the specified list/library.

--- library retention label is set to a label that is valid for tenant
set-pnpretentionLabel -List "Legacy VC Interop Library" -Label "2 years"

--- time is allowed to pass, and the get-pnpretentionlabel is checked again
get-pnpretentionLabel -List "Legacy VC Interop Library"
WARNING: No label found for the specified list/library.

Steps to reproduce behavior

Please see above for actual

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

3.1.0

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions