This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.DESCRIPTION | |
This script will add the Service Principal of the Application as Owner of the Application. | |
It performs the following steps: | |
- Login to the graph.microsoft.com | |
- Validate the Application Id | |
- Retrieve the current owner(s) | |
- Add if applicable the application delegation for graph.microsoft.com/Application.ReadWrite.OwnedBy | |
- Perform if applicable the admin consent for the application delegation graph.microsoft.com/Application.ReadWrite.OwnedBy | |
- Add if applicable the service principal to the application as owner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Adds a new AppRole to an Application. | |
.PARAMETER Application | |
The Application object's object ID. | |
.PARAMETER AllowedMemberTypes | |
The allowed member types, Application, User or both. |