Automate Azure Privileged Identity Management (PIM) assignments for both Azure resource and Entra ID (Azure AD) roles—much faster than the Azure Portal. Fuzzy search and interactive prompts make role activation quick and user-friendly.
pimon the shell is significantly faster than the Azure Portal. Search, select, and activate roles in seconds—ideal for power users and automation.
Install and ensure these are in your PATH:
curl,az(Azure CLI),jq,fzf,pwsh(for Entra ID roles)
./pim [OPTIONS]--subscription, -sSubscription ID or name--resource-group, -gResource group name--role, -rRole name--message, -mJustification message--time, -tDuration (nH1-8 ornM5-60)--entra, -eRequest Entra ID (Azure AD) role (ignores sub/rg)--helpShow help
If any parameter is omitted, you'll be prompted (with fuzzy search for sub/rg/role).
Entra ID role:
./pim --entra --role "Global Administrator" --time 1H --message "Emergency access"Azure resource role:
./pim --subscription "My Subscription" --resource-group "MyResourceGroup" --role "Contributor" --time 4H --message "Access required for deployment"- Main logic:
pim(Bash) - Entra ID support:
pim_entra.ps1(PowerShell, Microsoft Graph SDK)
Contributions are welcome! Please fork the repository and create a pull request with your changes.
MIT License. See LICENSE.