OAuth 2.0 credentials
Summarize
Summary of OAuth 2.0 credentials
OAuth 2.0 credentials in ServiceNow allow your instance to securely obtain access tokens for user accounts on HTTP services. These credentials enable integrations with OAuth providers by managing authentication details such as grant types, scopes, and token requests. The credentials form in ServiceNow provides configurable fields to define and control OAuth 2.0 authentication behavior.
Show less
Key Features
- Name: Assign a unique, descriptive name to identify each OAuth 2.0 credential record.
- Active: Enable or disable the credential as needed.
- OAuth Entity Profile: Links the credential to an OAuth profile that includes grant types (e.g., Client Credentials, Authorization Code) and scopes.
- Connect to Auth Server via MID Server: Allows your ServiceNow instance to connect to OAuth servers behind firewalls or cloud-based servers through a MID Server. This option is available when using specific grant types (Client Credentials, Authorization Code, Resource Owner Password Credentials).
- Applies to: Defines whether the credential applies to all MID Servers or specific ones. When connecting via MID Server, ensure selected MID Servers can communicate with the OAuth provider’s token URL, are up, validated, and have REST or ALL capability enabled.
- Order: Sets the priority sequence for credential use during device login attempts, important for managing multiple credentials and preventing account lockouts.
- Credential Alias: Associates an alias with the OAuth 2.0 credential for easier reference.
- Integration Type: Specifies how the token is used:
- System: Retrieves token information based on the requester profile, supporting SAML and JWT authentication mechanisms.
- Personal: Retrieves user-specific token information; requires the MID Server user to have the oauthadmin role. Supports Authorization Code and Resource Owner Password Credentials grant types.
Practical Considerations
- Use Personal integration type to access user-related data requiring user-specific tokens.
- When invoking APIs with OAuth tokens, ensure the correct integration type and grant type align with your use case.
- If using MID Server connectivity, verify MID Server status and capabilities to ensure successful token requests.
- To use session user tokens in Flow Designer, set the Run As property to "User who initiates session."
OAuth 2.0 credentials enable ServiceNow to obtain access to user accounts on an HTTP service.
| Field | Input value |
|---|---|
| Name | Enter a unique and descriptive name for this credential. For example, you might call it OAuth2 credential. |
| Active | Specify whether this credential is active. |
| OAuth Entity Profile | An OAuth profile is a combination of a grant type and at least one scope. |
| Connect to Auth Server via MID Server | Connects your ServiceNow instance to an on-premise OAuth server that resides behind a firewall through a MID Server. It can also connect your ServiceNow instance to a cloud-based OAuth server through a MID server. When this option is enabled, the request for an OAuth token is sent through the MID Server. Important:
|
| Applies to | Specify if the credential record is applicable for all MID Servers, or a specific MID Server. If specific, add the MID servers as necessary. Important: Ensure that you are aware of these considerations if you have selected the Connect to Auth Server via MID Server check box.
|
| Order | Order (sequence) in which Discovery tries this credential as it attempts to log on to devices. The smaller the number, the higher in the list this credential appears. Establish credential order when using large numbers of credentials or when security locks out users after three failed login attempts. If all the credentials have the same order number (or none), the instance tries the credentials in a random order. |
| Credential alias | Specify the credential alias that you want to tie to the OAuth 2.0 credential. |
| Integration Type | Indicates the integration type for the credential. Invoke an API of a third-party with an OAuth request that generates an OAuth token that is system or user specific. Following are the integration types:
If this Personal is selected on the OAuth Requestor Profile page, an additional flag called as Personal is displayed. Note:
|