Skip to content
InvardiaInvardia
Why InvardiaProductsFeaturesPricingCommunity
Docs
All documentation
Product documentationPIM ManagerSecurityInsight
SettingsPIM Manager settingsSecurityInsight settingsEntra Policy Suite settings
ScriptsPIM Manager scriptsSecurityInsight scriptsEntra Policy Suite scriptsInvardia scripts
Error codesPIM Manager error codesSecurityInsight error codes
API and MCPPIM Manager APIPIM Manager MCP toolsSecurityInsight APISecurityInsight MCP tools
SecurityPIM Manager security packSecurityInsight security packEntra Policy Suite security pack
Network and designPIM Manager network guidesPIM Manager command wizardNetwork egressDesign your installationCalculate your cost
SupportSetup scriptsRemote support access
Search the docs
SupportAboutContactBook a demoCustomer portalDesign your installationFree Pro trial

PIM Manager scripts

Deploy-PimActivatorBackend

PIM Activator: create the sign-in app registration

Purpose

Creates or updates the PIM Activator app registration in your tenant (the sign-in app of the PIM Activator browser extension): its SPA redirect URIs, its delegated Microsoft Graph and Azure permissions, and tenant-wide admin consent for them. Every user of the tenant can sign in to the app ("Assignment required" is off); what a person can activate is decided by their PIM eligibility, not by this app.

When to run it

Once per tenant before the PIM Activator browser extension is rolled out (PIM Manager > Operations > Client onboarding, step 1, shows the command with your values), and again when the extension needs a new permission. Re-runnable: an existing app with the same display name is updated in place. Run it once more if an earlier version of this script set "Assignment required" on the app: it switches it off again.

Who may run it

KindRoleScopeWhy
entraRoleApplication Administratortenant (active, not only eligible)creates / updates the app registration and its service principal, including its 'Assignment required' setting. Cloud Application Administrator or Global Administrator also work.
entraRolePrivileged Role Administratortenant (active, not only eligible)only with -GrantConsent (the default): tenant-wide admin consent that includes the protected RoleManagement.ReadWrite.Directory permission. Global Administrator also works; -GrantConsent:$false skips it.
otherDelegated sign-in: Application.ReadWrite.All, DelegatedPermissionGrant.ReadWrite.AllMicrosoft Graph, for the first-party app Microsoft Graph Command Line Toolsthe browser sign-in (auth code + PKCE, no extra app) asks for exactly these delegated permissions; they act only within your own roles above. Automation alternatives: -AccessToken with the same scopes, or -AppId + -CertificateThumbprint of an app holding the equivalent application permissions.

What it changes

WhereActionWhatPermission / roleScopeWhyUndo
Microsoft Entra IDcreateservice principals of the Microsoft first-party APIs Microsoft Graph and Azure Service Management -- only when the tenant does not have them yetthe delegated permission ids are read from these service principals; a fresh tenant may not have instantiated themnone needed -- Microsoft first-party service principals; leave them
Microsoft Entra IDcreateapp registration 'PIM Activator' (-DisplayName), single tenant (AzureADMyOrg); updated in place when it existsthe extension signs users in with itdelete the app registration (Entra admin center > App registrations > PIM Activator > Delete)
app registration 'PIM Activator'updateSPA redirect URIs https://<extension id>.chromiumapp.org/ and chrome-extension://<extension id>/ (merged with the URIs already there; public-client URIs cleared). -Channel Both / Test also adds the TEST build's id (internal tenants only)launchWebAuthFlow returns to the chromiumapp.org URI; Entra validates the extension origin on token redemptionremove the URIs under Authentication, or delete the app registration
app registration 'PIM Activator'updaterequired permissions (delegated): Microsoft Graph PrivilegedAccess.ReadWrite.AzureADGroup, Group.Read.All, User.Read, RoleManagement.Read.Directory, RoleManagement.ReadWrite.Directory, AdministrativeUnit.Read.All, Application.Read.All; Azure Service Management user_impersonationwhat the extension needs to list and activate PIM eligibilities (groups, Entra roles, Azure roles) and to find this app in its setup wizard. PrivilegedAccess.Read.AzureADGroup is not enough: activation needs ReadWrite.remove them under API permissions, or delete the app registration
Microsoft Entra IDcreateservice principal (enterprise application) of 'PIM Activator'the tenant's instance of the app: the consent and the 'Assignment required' setting live on itdeleted with the app registration
enterprise application 'PIM Activator'update'Assignment required' = No (appRoleAssignmentRequired = false) -- only written when it is Yes today, for example because an earlier version of this script set itevery user of the tenant can sign in to the PIM Activator. The app is only how the extension signs in: what a person can activate is decided by their PIM eligibility. Nobody is assigned by this script, and users and groups already assigned to the enterprise application are left as they are -- with assignment not required they change nothing.Enterprise applications > PIM Activator > Properties > Assignment required = Yes (then assign who may sign in under Users and groups; the next run of this script switches it off again)
Microsoft Graphgranttenant-wide admin consent (oauth2PermissionGrant, consentType AllPrincipals) from 'PIM Activator' to Microsoft Graphdelegated: PrivilegedAccess.ReadWrite.AzureADGroup Group.Read.All User.Read RoleManagement.Read.Directory RoleManagement.ReadWrite.Directory AdministrativeUnit.Read.All Application.Read.All openid profile offline_accessall users of the tenant; a delegated permission acts only within the signed-in user's own rightsusers are not asked to consent one by one (with -GrantConsent, the default)Enterprise applications > PIM Activator > Permissions > revoke, or delete the oauth2PermissionGrant
Azure Service Managementgranttenant-wide admin consent (oauth2PermissionGrant, AllPrincipals) from 'PIM Activator' to Azure Service Managementdelegated: user_impersonationall users of the tenant; acts only within the user's own Azure rightsthe extension lists and activates the user's Azure role eligibilitiesEnterprise applications > PIM Activator > Permissions > revoke

What it only reads

  • your own sign-in (/me) and your active Entra roles (from the token, or /me/memberOf)
  • the published permission ids of the Microsoft Graph and Azure Service Management service principals
  • app registrations named -DisplayName, and the enterprise application's 'Assignment required' setting
  • existing admin-consent grants of the app

Parameters

ParameterRequiredDefaultWhat it does
-TenantIdnothe home tenant of the account you sign in withYour tenant id; the sign-in is refused when it lands in another tenant. Required for app-only sign-in.
-ChannelnoReleasedReleased registers only the released extension id. Both / Test also register the TEST build (internal tenants only).
-DisplayNamenoPIM ActivatorDisplay name of the app registration (also how an existing one is found).
-ExtensionIdnoeheocihmlppcophaeakmdenhgcookkabThe extension id; change it only for a fork of the extension.
-GrantConsentnotrueGrant tenant-wide admin consent. -GrantConsent:$false skips it (users or an approver consent later).
-UseEdgenotrueOpen the sign-in in Microsoft Edge (the default browser when Edge is missing). -UseEdge:$false uses the default browser.
-AccessTokennoAutomation: a Microsoft Graph token you already have, with the delegated scopes above. Skips the browser sign-in.
-AppIdnoAutomation, app-only: client id of an app holding Application.ReadWrite.All (+ DelegatedPermissionGrant.ReadWrite.All for consent) as application permissions. Use with -CertificateThumbprint and -TenantId. Not used by the command PIM Manager shows.
-CertificateThumbprintnoAutomation, app-only: thumbprint of that app's certificate in the local certificate store. Not used by the command PIM Manager shows.
-AssignToGroupIdnoNo longer used. Earlier versions assigned this group to the app and set 'Assignment required'. Still accepted so a command copied from an earlier PIM Manager page keeps working: the script says it is ignored and assigns nobody.

Preview with -WhatIf

Signs in, reads the tenant, and prints a 'What if:' line for every change: the app registration it would create or update (with its redirect URIs and permissions), the service principal it would create, 'Assignment required' = No when it is Yes today, and the two admin-consent grants. Nothing is written.

Undo

Delete the app registration 'PIM Activator' in the Entra admin center (App registrations > PIM Activator > Delete): that removes its service principal and its consent grants with it. The PIM Activator extension can then no longer sign in.

Network

It connects to: login.microsoftonline.com, graph.microsoft.com

Download and run

Run these lines in PowerShell: the first downloads the script into the current folder, the second runs it.

Invoke-WebRequest https://invardia.com/support/pim/Deploy-PimActivatorBackend.ps1 -OutFile Deploy-PimActivatorBackend.ps1
.\Deploy-PimActivatorBackend.ps1

To check the download first, compare its SHA-256 with the published one:

SHA-256 0b105a62f44d33a5ca6443c942c6c54727276e215560fd55672440f26996f9c3

Checksums: SHA256SUMS.txt · Version 3.0.70

Before you run it, compare the file's SHA-256 with its line in SHA256SUMS.txt.

Every parameter: Get-Help .\Deploy-PimActivatorBackend.ps1 -Full · Source: Deploy-PimActivatorBackend.ps1

Every script, identity and permission for your security review: PIM Manager

InvardiaInvardia

See the risk. Control the access.

Products

PIM ManagerSecurityInsightEntra Policy SuiteAll featuresPricingFree 60-day Pro trialBook a demoWhy Invardia

Docs

DocumentationSearch the docsPIM Manager settingsSecurityInsight settingsPIM network guidesCommand wizardNetwork egressPIM Manager design configuratorSecurityInsight design configuratorDesign your installationCalculate your cost

Company

AboutContactCustomer portalSupportHow support worksHow updates reach youSupport in numbersSetup scriptsRemote support accessContact: info@invardia.com

Legal

Terms of saleLicence termsData processingPrivacyCookiesCompany information
© 2026 Invardia – a brand of 2LINKIT, founded and owned by Morten Knudsen · Strandvejen 21A, 6000 Kolding, Denmark · VAT DK39208032 · Contact: info@invardia.com