Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

AADApplication: Creating enterprise apps and associated SPN from the gallery

Open adhodgson1 opened this issue 11 months ago • 2 comments

I want to use the AADApplication resource to create enterprise apps in a tenant which use the gallery template. For example, to allow people to sign into services like GitHub, Zoom etc. I think we would need the ApplicationTemplateId parameter, but is there anything else we need to allow us to create such applications using DSC? Thanks.

adhodgson1 avatar Mar 08 '24 14:03 adhodgson1

I modified the AADApplication resource to add the missing applicationTemplateId field using the New-MGApplication cmdlet. However when creating an application I get access denied.

Investigating this further I discovered that if you want to create an application from a gallery template we need to use the Invoke-MgInstantiateApplicationTemplate cmdlet instead.

I have tested this locally and this seems to be the way to go, my question is should this be implemented as a new resource?

adhodgson1 avatar Apr 03 '24 11:04 adhodgson1

Example of this functionality can be viewed here: https://github.com/orgs/msgraph/discussions/57

adhodgson1 avatar Apr 03 '24 11:04 adhodgson1