Identity Consumer Instance
These are the configuration changes to be made in the identity consumer instance when setting up an OAuth Connection.
Create Application Registry
In native ServiceNow, navigate to System OAuth > Application Registry and click New.
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MQBk35gIi557UHt7QlJ-850646046%252Fuploads%252F30ESRN12wRQI9UJibDTJ%252FHTSOCG%2520-%2520Identity%2520Consumer%2520Instance%25201.png%3Falt%3Dmedia%26token%3D38af270f-85bc-49c6-9f6b-9f533ad44a2c&width=768&dpr=4&quality=100&sign=c1d928a8&sv=1)
On the interceptor page, click Connect to a third party OAuth Provider.
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MQBk35gIi557UHt7QlJ-850646046%252Fuploads%252FdEPrxWNRtNadaDWBsDkF%252FHTSOCG%2520-%2520Identity%2520Consumer%2520Instance%25202.png%3Falt%3Dmedia%26token%3D0a0a110a-6ed4-4d1a-81e9-da0eebe22658&width=768&dpr=4&quality=100&sign=60a8db7d&sv=1)
The fields to be configured for the Application Registry record are as follows:
Field | Description | Value |
---|---|---|
Name | Name of the OAuth app | <Your Unique Name> |
Client ID | The client id of the OAuth app | The Client ID from the Identity Provider Instance |
Client Secret | The client secret of the OAuth app | The Client Secret from the Identity Provider Instance |
Default Grant type | The Default Grant Type used to establish the OAuth token | 'Resource Owner Password Credentials' |
Refresh Token Lifespan* | The number of seconds a refresh token issued will be good for | 8,640,000 (default value - automatically populated) |
Token URL | OAuth token endpoint to retrieve access and refresh tokens | 'https://<your-provider-instance>.service-now.com/oauth_token.do' |
Comments | Comments about the OAuth app | <Your description of the purpose of the OAuth entity> |
*This value is to be left as-is.
Token URL: Replace the <your-provider-instance>
element of the URL with that of the Identity Provider Instance.
Your Application Registries New Record should look like this:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MQBk35gIi557UHt7QlJ-850646046%252Fuploads%252F3KZ2AVKmhtjBVCG4nlmN%252FHTSOCG%2520-%2520Identity%2520Consumer%2520Instance%25203.png%3Falt%3Dmedia%26token%3D3d87b95d-9fd7-40dc-9167-76e279332554&width=768&dpr=4&quality=100&sign=f77b6357&sv=1)
Right-click and Save to remain on the record.
Validate that the OAuth Entity Profiles related list has been populated with the following values:
Name: <Your Unique Name> default_profile
Is default: true
Grant type: Resource Owner Password Credentials
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MQBk35gIi557UHt7QlJ-850646046%252Fuploads%252FiMvxxcyaJOS5pfdNTHY0%252FHTSOCG%2520-%2520Identity%2520Consumer%2520Instance%25204.png%3Falt%3Dmedia%26token%3D686b9158-5729-482a-afac-53306be86983&width=768&dpr=4&quality=100&sign=174b182d&sv=1)
This is the profile which will be selected when configuring the Connection.
Configure Connection
In Unifi Integration Designer, navigate to Connections and click New.
We are going to configure a Connection for the Pre-Production environment because we have already configured connections for both the Development and Test environments. Choose whichever environment is appropriate for your requirements.
The fields to be configured for the New Connection modal are as follows:
Field | Description | Value |
---|---|---|
Environment | The environment this connection applies to. | 'Pre-Production' |
Endpoint URL | The external system's access URL. | <External system Endpoint URL> |
Active | Use this connection for the integration when true. | <true> |
Outbound Connectivity
The format of the Endpoint URL is as follows:
https://<your_provider_instance>.service-now.com/<your_provider_process_api>
The entire Endpoint URL can be easily obtained from the automatically created Message Resource on the Unifi Scripted REST API (displayed in the widget at the top of the Connections page in the other instance).
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MQBk35gIi557UHt7QlJ-850646046%252Fuploads%252FKJidBP41O8zCpC8aFfPi%252FHTSOCG%2520-%2520Identity%2520Consumer%2520Instance%25205.png%3Falt%3Dmedia%26token%3D3c64de40-24b6-4aee-b116-b111ee09a63c&width=768&dpr=4&quality=100&sign=80c08e8&sv=1)
Your New Connection modal should look like this:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MQBk35gIi557UHt7QlJ-850646046%252Fuploads%252FRavJdz26cJLcKPd4dWLb%252FHTSOCG%2520-%2520Identity%2520Consumer%2520Instance%25206.png%3Falt%3Dmedia%26token%3D21ea0af4-b322-4eb8-9a78-370ddb9638a5&width=768&dpr=4&quality=100&sign=b7d5825c&sv=1)
Submit and view to further configure the Connection.
Connection Details
The fields to be configured for the Details form are as follows:
Field | Description | Value |
---|---|---|
Authentication | The authentication method to use for this connection. | 'OAuth 2.0' |
OAuth Profile | The OAuth Entity Profile to authenticate with. | '<Your Unique Name> default_profile' (as created/validated above) |
Inbound user | The user profile used by the external system for authentication. An active connection must be found for the user to gain access. | lookup: <Your Inbound User> |
Your Details form should look like this:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MQBk35gIi557UHt7QlJ-850646046%252Fuploads%252F7j1PWJcIsAMhvS4EMz4a%252FHTSOCG%2520-%2520Identity%2520Consumer%2520Instance%25207.png%3Falt%3Dmedia%26token%3Da8a00ec7-7057-44f6-8713-2c1fd7e75e2a&width=768&dpr=4&quality=100&sign=fc15535a&sv=1)
Save the Connection.
Get OAuth Token
Once you have saved the Connection, the 'Get OAuth Token' button is available.
Click Get OAuth Token.
On the modal that pops up, enter the Username & Password (for the Inbound user of the Identity Provider Instance).
Click Get OAuth Token.
The 'OAuth token flow completed successfully' info message is displayed. Close the modal.
Congratulations. You have successfully configured both halves of the OAuth Connection.
To future proof your OAuth connection, please consider setting up the OAuth Refresh Token Job.
Last updated