Microsoft365DSC
Microsoft365DSC copied to clipboard
IntuneDeviceConfigurationPolicyAndroidOpenSourceProject: Fixed policy assignment retrieval when Id is from other tenant, bogus or null
Pull Request (PR) description
This PR fixes the issue I reported on #3971 where an Id might come from another tenant, or even be null since it's not mandatory, and then it failed retrieving the policy assignment due to that.
While making the tests with this fix I also noted that the CIM instances (in this case Assignments) were not being tested properly and Test-TargetResource always returned $false even when it was correct, so while here I also fixed the compare logic by using the same code already used in several other resources.
This Pull Request (PR) fixes the following issues
- Fixes #3971