msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Whe creating a new application from template the owner is not set

Open Lumute opened this issue 4 years ago • 0 comments
trafficstars

Hello,

I have an application that creates other applications using Invoke-MgInstantiateApplicationTemplate.

This main application has Application.ReadWrite.OwnedBy permission but the problem is that this method of creating the application is leaving the owners empty (verified using Get-MgApplicationOwner), so I cannot update the application after created, including adding itself as the owner...

When creating an application using New-MgApplication the owner is automatically set to the ServicePrincipal of the main application, I think Invoke-MgInstantiateApplicationTemplate should do the same...

Am I doing something wrong or is it a problem of the template I'm using? (8adf8e6e-67b2-4cf2-a259-e3dc5476c621)?

The only workaround I found was to give the main application Application.ReadWrite.All but would like to avoid this.

AB#10869

Lumute avatar Aug 26 '21 00:08 Lumute