Skip to content

[BUG] Get-PnPTenantSyncClientRestriction returns empty string under ExcludedFileExtensions  #3098

@rajarshibhargav

Description

@rajarshibhargav

Reporting an Issue or Missing Feature

Please confirm what it is that your reporting

ExcludedFileExtensions is an attribute returned by PnPTenantSyncClientRestriction. The value of ExcludedFileExtensions is set to None by default.

When we run the command Get-PnPTenantSyncClientRestriction we get the expected output as in
:

`PS /app> Get-PnPTenantSyncClientRestriction

BlockMacSync : False
AllowedDomainList : {}
ExcludedFileExtensions : {}
OptOutOfGrooveBlock : False
OptOutOfGrooveSoftBlock : False
DisableReportProblemDialog : False
TenantRestrictionEnabled : False
`

However when we convert this to json like:

PS /app> Get-PnPTenantSyncClientRestriction | ConvertTo-Json -Depth 3 { "BlockMacSync": false, "AllowedDomainList": [], "ExcludedFileExtensions": [ "" ], "OptOutOfGrooveBlock": false, "OptOutOfGrooveSoftBlock": false, "DisableReportProblemDialog": false, "TenantRestrictionEnabled": false }

Note that there is an empty string inside ExcludedFileExtensions when running the command ConvertTo-Json -Depth 3. Other empty fields like AllowedDomainList : {} however show correct behaviour even with ConvertTo-Json -Depth 3

Expected behavior

Please describe what output you expect to see from the PnP PowerShell Cmdlets

Running Get-PnPTenantSyncClientRestriction | ConvertTo-Json -Depth 3 should return ExcludedFileExtensions as empty array instead of array with empty string .

Actual behavior

Please describe what you see instead. Please provide samples of output or screenshots.
Running Get-PnPTenantSyncClientRestriction | ConvertTo-Json -Depth 3 returns ExcludedFileExtensions as array with empty string

Steps to reproduce behavior

Please include complete script or code samples in-line or linked from gists

PS /app> Get-PnPTenantSyncClientRestriction | ConvertTo-Json -Depth 3

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

(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)

Manifest 2.1.1

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

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

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