You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've started using the DRG to build the foundation for a few resources but has now run into the problem, if you will, that if DRG gets the impression from Graph that a resource doesn't contain (nested) CimInstances, it doesn't provide any hints about how to go about adding a CimInstance to a resource. I've had to go the long route and compare with other resources that seemed to 'fit the bill' but it would be nice to have a place to go when I need to lookup 'how do I...' when building or modifying a resource. Any pointers besides https://microsoft365dsc.com/user-guide/advanced/dynamic-resource-generator/ that I'm not aware of ?
The text was updated successfully, but these errors were encountered:
I have posted a PR #2823 with improved nested CIM management - it should fix most issues with nested CIM
Feel free to share the cmdlet noun you've used and I'll have a look
thanks
I've spent some hours with MgDirectoryAdministrativeUnit and its beta-cousin MgAdministrativeUnit. In earlier versions of the Graph-modules, there were parameters for Members and ScopedRoleMembers. ScopedRoleMembers has a nested object/hashtable that DRG correctly translated to a CIM class, but the export-code didn't handle it.
I went down a rabbit-hole and the code became so ugly that I decided to start over, but in the meantime Graph had moved on and the above parameters were gone so I had to add the CIMInstances manually and that was a bit of a struggle.
For the export you can use the ComplexTypeMapping parameter of Get-M365DSCDRGComplexTypeToString - it will overwrite the hashtable and construct the CIM instance for the export file
You can check MSFT_AADEntitlementManagementAccessPackageCatalogResource to see how it works
I have included the logic in the DRG now - it should be automatic
That's the kind of 'documentation' I'm looking for. If you feel like it, a few words and some pointers in the M365DSC blog would go a long way in my book.
I'm aware that the intent for building new resources is to use the DRG. But some resources lend themselves to be customized. One such example is (New-)MgAccessReviewDefinition that seems a bit too complex when all I'm looking for is a resource that'll let me setup Access Reviews for guest users by members of a named security-group. That made me consider building a basic resource where I can add CimInstances if or when required by practical requirements. I'm still considering that and will try to find time to see how it turns out. Now I'm at least somewhat armed.
I've started using the DRG to build the foundation for a few resources but has now run into the problem, if you will, that if DRG gets the impression from Graph that a resource doesn't contain (nested) CimInstances, it doesn't provide any hints about how to go about adding a CimInstance to a resource. I've had to go the long route and compare with other resources that seemed to 'fit the bill' but it would be nice to have a place to go when I need to lookup 'how do I...' when building or modifying a resource. Any pointers besides https://microsoft365dsc.com/user-guide/advanced/dynamic-resource-generator/ that I'm not aware of ?
The text was updated successfully, but these errors were encountered: