Open powershellpr0mpt opened 1 year ago
This is one of the challenges with objects within M365 and Azure. The ID of those is created during the initial add of the resource. We see this challenge across various resources on how to handle the need to have a unique ID for objects that might not exist in the first place... see 2006 for more information about the challenge of handling keys within resources.
I can think of two possible solutions for your challenge.
The second option would also help in scenarios with exporting/import use-cases.
That's what I feared... But it makes a lot of sense.
For future reference, I'll tag #2006 for easy reference. Also, I'll be looking into option 2, but fear this might take a while (only just started playing with M365DSC a month, still need to find out exactly how the moving parts interact).
I see a lot of potential when I can get this to work, as it can be re-used in a lot of other resources, but not fully familiar with the process yet. Thanks for the heads up @andikrueger
When creating a Windows 10 Compliance Policy in Intune, I can easily do that using the provided resources. The same goes for an Azure AD Group.
I want to automatically assign this policy to a group which I will create in the same configuration. However the Assignments property requires the groupId property to assign the policy to a group.
Is there any way to link these 2 without knowing the groupId in advance?
Example configuration