Register web client
- Last UpdatedNov 07, 2024
- 2 minute read
The following sections describe how to register PCS clients. There can be one web client and one mobile client and one ApiAdapter client per server.
Parameters for Powershell commands for web client
First, an explanation of the parameters used in the Powershell commands.
|
Parameter |
Description |
|---|---|
|
Id |
The Id should reflect the purpose of the client. For example, osmclientwebprod or osmclientwebuat. This is the value that the OSM installer will require. |
|
Name |
Must be equal to value for Id parameter. |
|
HostBase |
The machine/server name where PCS is installed. |
|
AllowedCorsOrigins |
OSM Web application domain name with fully qualified name and domain. |
|
RedirectUris |
This is used to redirect after sign in. Examples
|
|
PostLogoutRedirectUris |
This is login page after signing out. Examples
|
|
AccessTokenLifetime |
The validity time of the access token for OSM. The default value is 3600 seconds; however, you should change this value to a much lower value. From the security point of view, the shorter the access token lifetime, the better. |
|
IdentityTokenLifetime |
The validity time of the access token for AVEVA Identity Manager. The default value is 3600 seconds; however, you should change this value to a much lower value. From the security point of view, the shorter the access token lifetime, the better. |
Using Add command to register web client
Note: Ensure that command is one long string without any carriage returns. Any returns in the command will cause an error.
To register web client with Add command
-
Open Windows PowerShell in Administrator mode.

-
Enter the command statement.
Add-IdentityManagerClient -HostBase "https://pcs_server_name.company.com" -Id osmclientwebprod -Name osmclientwebprod -Secret osmwebclientsecret -AllowedCorsOrigins "https://osm_domain_name.company.com","https://osm_domain_name" -PostLogoutRedirectUris "https://osm_domain_name.company.com/#/login" -RedirectUris "https://osm_domain_name.company.com/#/callback?","https://osm_domain_name.company.com/silent-refresh.html" -ScopeRestrictions "openid","profile" -AllowedGrantTypes "implicit" -AllowRememberConsent 0 -RequireConsent 0 -SkipLoggedOutPage 1 -AccessTokenLifetime 600 -IdentityTokenLifetime 600

The results should look like this.

-
Close PowerShell by exit.
-
Restart the AVEVA Identity Manager service.
