-
Notifications
You must be signed in to change notification settings - Fork 80
Add script to assign Managed Identity to Maestro app #5427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new PowerShell script for assigning managed identities to the Maestro application with specific roles. The script automates the process of granting user or admin roles to Azure Managed Identities by creating app role assignments via the Microsoft Graph API.
- Adds a script to assign managed identities user or admin roles in the Maestro application
- Uses Azure CLI and PowerShell Az modules to interact with Azure and Microsoft Graph
- Supports both user and admin role assignments with hardcoded role IDs
| [string]$ManagedIdentityName, | ||
|
|
||
| [Parameter(Mandatory = $false)] | ||
| [string]$AppServicePrincipal = "caf36d9b-2940-4270-9a1d-c494eda6ea18", # Maestro application object ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the prod one? Maybe we should say that in the comment and also provide the staging one, so we don't have to look for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess then we'd have a different user and admin role ID too tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probs just fetch role ID same way we fetch principal ID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how often would assigning MI to staging app be used though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't have the permissions for that - we need to do that manually from the manifest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the comments about INT because there the app role IDs would not work anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People can adjust this when using the script, I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, it's easy enough to find
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.