Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 6 tasks
rajarshibhargav opened this issue May 10, 2023 · 1 comment · Fixed by #3099
Closed
1 of 6 tasks
Labels
bug Something isn't working

Comments

@rajarshibhargav
Copy link

rajarshibhargav commented May 10, 2023

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
@rajarshibhargav rajarshibhargav added the bug Something isn't working label May 10, 2023
gautamdsheth pushed a commit to gautamdsheth/powershell that referenced this issue May 10, 2023
gautamdsheth added a commit that referenced this issue May 17, 2023
#3099)

* Fix #3098 - issue with Get-PnPTenantSyncClientRestriction not showing values

* Update CHANGELOG.md

---------

Co-authored-by: Gautam Sheth <[email protected]>
@gautamdsheth
Copy link
Collaborator

Have fixed this, will be available with tomorrow's nightly build.
Thanks for raising this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants