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

Entra Policy Suite scripts

Set-EpsWebAccess

Documentation out of date

The documentation below was written for a different copy of this script than the one published now. Read the script itself before you run it, or ask support@invardia.com.

  • the .doc.json names no sha256 of the script it documents
  • the .doc.json is for version 2.0.0, the published script is 2.0.107

The published script's own summary: Names who may use the Entra Policy Suite web app: SuperAdmin, Admin or Reader. Used once to name the first SuperAdmin.

Purpose

Names a SuperAdmin of the web app when there is none: it starts the install's database setup job with that person, which writes the access list and the audit trail. A SuperAdmin then manages access in the app (Admin and Reader are given there). An install made before 2.0.59 is written directly (any role).

When to run it

Once after the install, or when no SuperAdmin is left.

Who may run it

KindRoleScopeWhy
azureRbacContributor (or any role that may start a Container Apps job)the install's resource groupstarts the database setup job, which names the SuperAdmin when there is none - no database right needed (installs made since 2.0.59)
otherthe Entra Policy Suite SQL server's Entra admin - only for an install made before 2.0.59 (no database setup job)the Entra Policy Suite databasewrites the access list directly
entraRoleany user who can read users (Directory Readers is enough)the tenantchecks the person exists and pins their object id

What it changes

WhereActionWhatPermission / roleScopeWhyUndo
SQLupdateeps.WebAccess (one row)the Entra Policy Suite databasewho may use the web appremove the person in the app's Access page (a SuperAdmin), or run again with -Role Reader
SQLcreateeps.AuditEvent (one row, access.grant)the Entra Policy Suite databaseevery access change is auditednot possible: the audit trail is append-only

What it only reads

  • Graph: the signed-in user and the named user (id, UPN)

Parameters

ParameterRequiredDefaultWhat it does
-TenantIdyesyour Entra tenant
-SubscriptionIdyesthe subscription Entra Policy Suite is installed in
-UserPrincipalNameyesthe person
-RolenoSuperAdminSuperAdmin, Admin or Reader
-Reasonyeswhy (goes into the audit trail)
-ResourceGroupnorg-epsthe install's resource group (an install made before 2.0.55: rg-entrapolicysuite, found by itself when it is there)

Preview with -WhatIf

The person, the role and who grants it; nothing is changed.

Undo

A SuperAdmin removes the person on the app's Access page.

Network

It connects to: login.microsoftonline.com, management.azure.com, graph.microsoft.com, <server>.database.windows.net

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/eps/Set-EpsWebAccess.ps1 -OutFile Set-EpsWebAccess.ps1
.\Set-EpsWebAccess.ps1 -TenantId <TenantId> -SubscriptionId <SubscriptionId> -UserPrincipalName <UserPrincipalName> -Reason <Reason>

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

SHA-256 463b67c29bffd5019447e850fda7aaf382af74c418bc31148ac1921eb21ec765

Checksums: SHA256SUMS.txt · Version 2.0.107 · Documentation for version 2.0.0

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

Every parameter: Get-Help .\Set-EpsWebAccess.ps1 -Full · Source: Set-EpsWebAccess.ps1

Every script, identity and permission for your security review: Entra Policy Suite

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