Skip to content

Conversation

@premun
Copy link
Member

@premun premun commented Nov 4, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 4, 2025 13:23
Copy link
Contributor

Copilot AI left a 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
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Member

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>
@premun premun merged commit 77b45e1 into main Nov 4, 2025
3 of 9 checks passed
@premun premun deleted the premun-patch-1 branch November 4, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants