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

SPOTenantCdnPolicy: Few issues #4658

Closed
ricmestre opened this issue May 9, 2024 · 0 comments · Fixed by #4659 or #4674
Closed

SPOTenantCdnPolicy: Few issues #4658

ricmestre opened this issue May 9, 2024 · 0 comments · Fixed by #4659 or #4674

Comments

@ricmestre
Copy link
Contributor

Description of the issue

  • If IncludeFileExtensions is doesn't match what's in the tenant then it applies the new values, correctly, nevertheless there's a missing chunck of code right below for ExcludeRestrictedSiteClassifications that if it also needs to be changed it will actually apply the values of IncludeFileExtensions instead of the correct ones.

Please note that due to this issue above then I had another problem which was getting the original value of the tenant back which was an empty value for ExcludeRestrictedSiteClassifications, I tried to deploy it but the value never changed and I didn't receive any error messages back. After some troubleshooting I found out that cmdlet Set-PnPTenantCdnPolicy doesn't accept a PolicyValue empty or null, the only way to solve my problem was to use the M365 CLI which actually accepted it. I've reported this on the PNP PS repo here pnp/powershell#3935

  • When exporting these policies the ResourceInstanceName in the blueprint will combine all properties of the resource instead of only using CDNType, this is being caused by a PR I submitted to change the heuristics of simplifying the assignment of ResourceInstanceName but I missed to add this one as primary key and it was there before. This is not a direct problem in the resource but rather in M365DSCUtil module.

e.g. Currently it exports like this "SPOTenantCdnPolicy-PublicCSS EOT GIF ICO JPEG JPG JS MAP PNG SVG TTF WOFF WOFF2 FONTCONFIG OTF$Credscredential" instead of this "SPOTenantCdnPolicy-Public"

I'll raise a PR to solve this.

Microsoft 365 DSC Version

1.24.424.1

Which workloads are affected

SharePoint Online

The DSC configuration

N/A

Verbose logs showing the problem

N/A

Environment Information + PowerShell Version

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant