This repo contains a few PowerShell scripts that use the Azure CLI to create or find Azure Active Directory objects:
- Find Service Principal or Managed Identity with find_workload_identity.ps1, using any of these as argument:
- Application/Client id
- Object/Principal id
- (Display) Name
- Service Principal Name
- Resource id of a resource with a System-assigned Identity
- Resource id or name of a User-assigned Identity
- Use Microsoft Graph to list Managed Identities with list_managed_identities.ps1, using:
- Azure subscription and optional resource group
- Name (pattern)
- Purge deleted directory objects (e.g. applications) purge_deleted_objects.ps1
- Configure Terraform azuread/azurerm provider
ARM_*
environment variables to use the AzureCLI task Service Connection:
set_terraform_azurerm_vars.ps1 - Create Managed Identity for Service Connection with Workload identity federation: create_azurerm_msi_oidc_service_connection.ps1
- Create Managed Identity for Service Connection with Workload identity federation with Terraform
- List identities for Azure Pipeline Service Connections in Azure Active Directory pertaining to Azure DevOps organization and (optionally) project: list_service_connections.ps1
- 'Pretty-name' Azure Active Directory applications created for Service Connections, so the Service Connection name is included in the application display name: rename_service_connection_applications.ps1
- Create Service Principal for GitHub Actions with Workload identity federation: create_sp_for_github_actions.ps1