AADMSGroup: Add IsAssignableToRole parameter
Details of the scenario you tried and the problem that is occurring
We create new AAD groups using the AADMSGroup module. We have also added a custom DSC resource module to assign roles to those groups. However, this always fails since the ADDMSGroup modules creates groups without the option to set the IsAssignableToRole property for the group to true - and this property cannot be changed after the group was created.
Verbose logs showing the problem
This is the error message we get from our module when trying to assign a role to the group created by the AADMSGroup module:
New-AzureADMSRoleAssignment : Error occurred while executing NewAzureADMSRoleAssignment
Code: Request_BadRequest
Message: Groups without IsAssignableToRole property set cannot be assigned to roles.
Suggested solution to the issue
Add an optional (boolean) "IsAssignableToRole" setting to the module and use that value for the corresponding parameter in the call to New-ADMSGroup in the Set-TargetResource function. This setting must only be allowed for Set-TargetResource when a new group gets created.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
N/A (custom module)
The operating system the target node is running
Azure DevOps release agent with "windows-2019" image
Version of the DSC module that was used ('dev' if using current dev branch)
1.20.1021.1
@NikCharlebois I'll take this
Thanks for implementing that so quickly! I'll close this issue now.