PPTenantSettings: EnableDesktopFlowDataPolicyManagement property type…
… change String -> Boolean
Pull Request (PR) description
In the mof file and psm1 the EnableDesktopFlowDataPolicyManagement property is defined as string whereas it is a boolean. This leads to warnings or error with Set-TargetResource.
This Pull Request (PR) fixes the following issues
- Fixes #6740
Task list
- [x] Added an entry to the change log under the Unreleased section of the file CHANGELOG.md. Entry should say what was changed and how that affects users (if applicable), and reference the issue being resolved (if applicable).
- [x] Resource parameter descriptions added/updated in the schema.mof.
- [ ] Resource documentation added/updated in README.md.
- [ ] Resource settings.json file contains all required permissions.
- [ ] Examples appropriately added/updated.
- [ ] Unit tests added/updated.
- [x] New/changed code adheres to DSC Community Style Guidelines.
Appreciate the fix. Unfortunately because this changes the type of the parameter, it is considered a breaking change. Boolean parameters are difficult because any non-null string is considered as a true-ish value, except for the number 0 which resolves to $false.
Edit: To not block this change, what you could do is a [System.Boolean]::Parse(...) before sending the request and add a #TODO in the module so that we consider this change for the next breaking change release in April of 2026.
I'm not sure to understand what you mean by using [System.Boolean]::Parse() as the code using the string type already contains one statement of this kind.
This leads to the warning
line breaks in current value of property EnableDesktopFlowDataPolicyManagement
from the LCM because the of the exception mechanism in the Utils module
@1Dimitri If I do an export of the configuration, will the property EnableDesktopFlowDataPolicyManagement have the value $True or "True"? I am not on my desktop right now, so can't check that for myself. If it is, then we might be able to slip that change into the next release. If the exported value however is usually a String, then it's definitely a breaking change unfortunately.
One addition: You missed the parameter in the Test-TargetResource function. It needs to be updated there as well. I will check the changes again this evening, with your modifications, and get back to you.