PI System administration guide
Configure Kerberos Authentication & Delegation for PI Vision & PI Web API
Configure Windows authentication, HTTP service principal names (SPNs), and constrained delegation so PI Vision and PI Web API can authenticate users and reach PI AF Server and PI Data Archive.
Before you begin
This procedure applies to Windows Integrated Security deployments. It does not apply when end users authenticate only through OpenID Connect. Follow the PI Vision Installation and Administration Guide for your installed version when its service names or account model differ from the examples below.
Prerequisites
- A stable short hostname and fully qualified domain name (FQDN) for each PI Vision or PI Web API endpoint that clients use.
- A chosen service identity: the default machine account, a dedicated domain account, or a group Managed Service Account (gMSA).
- Permission to change IIS, Windows services, PI Web API configuration, and Active Directory SPNs and delegation.
- The actual
AFServerandPIServerSPNs for every PI AF Server and PI Data Archive that the web tier must access. - A maintenance window to restart the affected application pools or services and a non-administrator test account with representative PI permissions.
Kerberos has two hops: the browser authenticates to the HTTP endpoint, then PI Vision or PI Web API delegates the user identity to PI AF Server or PI Data Archive. Test those hops separately.
1. Confirm the service identity and endpoint names
Record the account used by the PI Vision application pools and the PI Web API Windows service. Also record every hostname users and applications enter, including DNS aliases.
- In IIS Manager, open Application Pools and note the identities for the PI Vision application pools.
- In the Windows Services console, open the PI Web API service and note the account on the Log On tab.
- Resolve each client-facing name in DNS and decide whether users will use the short name, FQDN, or an alias.
- Confirm that the client, web server, domain controllers, AF Server, and Data Archive have synchronized time.
If PI Vision and PI Web API share one hostname, the account that owns its HTTP SPN must match the service design. Do not register the same HTTP SPN on two accounts.
2. Configure PI Vision Windows authentication in IIS
- Select the PIVision application in IIS Manager and open Authentication.
- Enable Windows Authentication. Disable Anonymous Authentication for this Windows-authenticated application unless your documented design requires it.
- Open the Windows Authentication providers and place Negotiate before NTLM.
- Keep Enable Kernel-mode authentication selected.
- Open Configuration Editor, select
system.webServer/security/authentication/windowsAuthentication, and setuseAppPoolCredentialsto True when PI Vision uses a custom domain account. - Apply the change and recycle the affected application pools or restart IIS during the maintenance window.
useAppPoolCredentials=true lets IIS use that identity to decrypt the Kerberos ticket while retaining kernel-mode authentication. Disabling kernel mode is an alternative workaround, not the preferred companion setting.
useAppPoolCredentials to True when the PI Vision application pools use a custom domain account.3. Enable Kerberos for PI Web API
Confirm the PI Web API service runs under the intended account, then check its authentication configuration in the AF Configuration database.
- Open PI System Explorer with permission to edit the configuration database used by PI Web API.
- Open
Configuration\OSIsoft\PI Web API\<instance>\System Configuration. - Open
AuthenticationMethodsand confirm thatKerberosis present. - Apply the change according to the administration guide for the installed PI Web API version, then restart the PI Web API service if that version requires it.
4. Register the HTTP SPNs
Register each client-facing HTTP name on the account that runs the corresponding web service. The SPN class remains HTTP even when users browse to an HTTPS URL.
Check for existing owners before adding anything:
setspn -Q HTTP/<web-short-name>
setspn -Q HTTP/<web-fqdn>
Then add the required names with -S, which checks for duplicates:
setspn -S HTTP/<web-short-name> <domain>\<service-account>
setspn -S HTTP/<web-fqdn> <domain>\<service-account>
If clients use a DNS alias, register the SPN for the name they actually enter and follow the alias guidance for the installed PI Vision version. Verify the final registration with:
setspn -L <domain>\<service-account>
setspn -X
5. Configure constrained delegation to PI AF Server and PI Data Archive
- Open the web-tier service account in Active Directory Users and Computers.
- On the Delegation tab, select Trust this user for delegation to specified services only.
- Select Use any authentication protocol when protocol transition is required. This allows the web tier to delegate even when the first hop falls back to NTLM.
- Add the
AFServerSPNs for each PI AF Server the application must access. - Add the
PIServerSPNs for each PI Data Archive the application must access. - Apply the change and allow time for Active Directory replication before testing.
Select the computer account when the backend service runs under its machine identity. Select the backend service account when AF Server or PI Network Manager runs under a custom domain account. Confirm the owner with setspn -Q instead of guessing.
msDS-AllowedToDelegateTo with the verified AFServer and PIServer SPNs. Do not copy placeholder SPNs directly into production.
6. Configure the client for integrated authentication
Use Group Policy where possible so all supported clients apply the same intranet authentication settings.
- Add the actual PI Vision and PI Web API URLs to the Windows Local intranet zone.
- Confirm the browser is allowed to use integrated Windows authentication for those URLs.
- Close and reopen the browser.
- Browse with the same hostname used in DNS and the HTTP SPN. Do not switch between an alias, short name, IP address, and FQDN during one test.
7. Verify both Kerberos hops
Sign in from a separate client computer with a representative non-administrator account. Test one AF attribute and one PI Point before opening a complex PI Vision display.
- Open PI Vision or the PI Web API endpoint with the registered hostname and confirm there is no unexpected credential prompt or HTTP 401 response.
- Run
kliston the client and confirm anHTTP/<web-name>service ticket exists. - Request one AF-backed value, then inspect PI System Explorer → File → Server Properties → Connections and confirm the expected user and Kerberos authentication.
- Request one PI Point value, then inspect PI System Management Tools → Operation → Network Manager Statistics and confirm the expected identity and Kerberos path rather than an unintended PI Trust fallback.
- Repeat the test with every supported hostname and with a representative account from each relevant user group.
If the HTTP ticket is missing, fix the client-to-web-server hop first. If the HTTP ticket exists but AF or Data Archive access fails, inspect constrained delegation, backend SPN ownership, and PI permissions.
| Symptom | Check first | Likely boundary |
|---|---|---|
| Credential prompt or HTTP 401 | Local Intranet policy, Negotiate order, hostname, HTTP SPN, and duplicate SPNs | Client to web server |
| PI Vision opens but AF or PI data fails | Delegation entries, backend SPN owner, service identity, and PI permissions | Web tier to backend |
| Short name works but FQDN or alias fails | DNS resolution and the HTTP SPN for the exact URL hostname | Endpoint naming |
| Authentication falls back to NTLM |
klist, Negotiate order, SPN ownership, and kernel-mode/application-pool credential settings |
Kerberos ticket negotiation |
Troubleshooting
klist: confirm the client uses the registered hostname, the URL is treated as Local intranet, Negotiate is enabled, and setspn -Q HTTP/<name> returns the intended account.useAppPoolCredentials=true, recycle the application pool, and retest. Keep kernel mode disabled only when the installed-version guidance or a documented infrastructure constraint requires that alternative.AFServer SPNs, confirm the correct AF service account or computer account is in the delegation list, and verify AF database permissions.PIServer SPNs, confirm the correct Data Archive service identity is delegated, and check mappings, trusts, and point permissions.TrustedToAuthForDelegation and msDS-AllowedToDelegateTo with the Active Directory team. Do not switch to unconstrained delegation.
