{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":40494,"path":"platform-security/authentication/connect-3rd-party-oauth-provider.md","title":"Connect to a third-party OAuth provider","bundle":null,"doc_type":null,"release":"australia","body":"\n# Connect to a third-party OAuth provider\n\nConfigure how the client ID and secret are sent to your OAuth provider.\n\n## Before you begin\n\nRole required: oauth\\_admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System OAuth** &gt; **Application Registry** and then click **New**.\n\n2.  On the interceptor page, click **Connect to a third-party OAuth provider** and then fill in the form.\n\n<table id=\"table_sgc_qqv_yq\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nUnique name for the third-party OAuth connection.\n\n</td></tr><tr><td>\n\nClient ID\n\n</td><td>\n\nThe client ID of application registered in the third-party OAuth server.\n\n</td></tr><tr><td>\n\nClient Secret\n\n</td><td>\n\nThe client secret of the application registered in the third-party OAuth server.\n\n</td></tr><tr><td>\n\nOAuth API Script\n\n</td><td>\n\nThe script used to customize request and response to the external OAuth provider.\n\n</td></tr><tr><td>\n\nLogo URL\n\n</td><td>\n\nThe OAuth application logo URL.\n\n</td></tr><tr><td>\n\nDefault Grant type\n\n</td><td>\n\nThe default grant type used to establish the token. Choices include:\n\n-   **Authorization code**: The code that is granted to the client to obtain an access token, which is then used to obtain access to the resource. If you select this option, then you need an authorization URL \\(the URL of the authorization server\\).\n-   **Resource owner password credentials**: The user name and password of the user that is trying to obtain access to the resource.\n-   **Client Credentials**: The client ID and client secret, which are both used to get the access token. This method does not provide refresh tokens.\n-   **JWT Bearer**: An authorization server validates a JWT token which enables identity and security information to be shared across security domains.\n-   **SAML2 Bearer**: Generates the SAML2 assertion and then exchanges the assertion for the access tokens wit the provider.\n\n**Note:** For outbound request to SuccessFactors use the **SAML2 Bearer** as the Default Grant Type.\n\n</td></tr><tr><td>\n\nRefresh Token Lifespan\n\n</td><td>\n\nTime, in seconds, that the refresh token is valid. The default time is 8,640,0000 seconds.\n\n</td></tr><tr><td>\n\nPublic Client\n\n</td><td>\n\nEnables public clients to require PKCE for an authorization.**Note:** You can use only Authorization Code as the **Default Grant type** when PKCE is enabled.\n\n</td></tr><tr><td>\n\nCode challenge method\n\n</td><td>\n\nThe code challenge method used in OAuth PCKE workflow. Choices include: -   S256 \\[Default\\]\n-   Plain\n-   None\n\n\n</td></tr><tr><td>\n\nComments\n\n</td><td>\n\nAdd any comments regarding the OAuth app.\n\n</td></tr><tr><td>\n\nApplication\n\n</td><td>\n\nApplication and scope that contain this record.\n\n</td></tr><tr><td>\n\nAccessible from\n\n</td><td>\n\nMake this app accessible from all application scopes or from this scope only.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nSelect the check box to make the app active.\n\n</td></tr><tr><td>\n\nAuthorization URL\n\n</td><td>\n\nThe OAuth authorization code endpoint.\n\n</td></tr><tr><td>\n\nToken URL\n\n</td><td>\n\nThe OAuth server token endpoint.\n\n</td></tr><tr><td>\n\nToken Revocation URL\n\n</td><td>\n\nThe OAuth server token revocation endpoint.\n\n</td></tr><tr><td>\n\nRedirect URL\n\n</td><td>\n\nThe OAuth callback endpoint. If blank, the instance auto-generates an entry.\n\n</td></tr><tr><td>\n\nUse mutual authentication\n\n</td><td>\n\nCheck the box to use mutual authentication for token request and revocation. This feature requires a mutual authentication profile to be specified.\n\n</td></tr><tr><td>\n\nSend Credentials\n\n</td><td>\n\nThe OAuth client populates the client credentials in the request: -   In Request Body \\(Form URL-Encoded\\)\n-   Basic Authorization header\n-   As Private Key JWT\n\n\n</td></tr><tr><td>\n\nClient Type\n\n</td><td>\n\nChoose the client type, based on the type of your client. Options:-   **Iframe Embedded**\n-   **Integration as a User**\n-   **Integration as a Service**\nTo know more, see [Configure client type for OAuth and SSO records](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/authentication/client-type.md).\n\n</td></tr></tbody>\n</table>    The system creates a record in the Application Registries \\[oauth\\_entity\\] table with type OAuth Provider.\n\n3.  Select OAuth Entity Profiles to validate a system-generated default profile for the new OAuth provider without any scope.\n\n    You can change or add an OAuth provider profile including the name, grant type, and OAuth Scope.\n\n4.  Select OAuth Entity Scopes to define all available OAuth scopes for this OAuth provider.\n\n    You can select the scopes when you create or update a profile. Each OAuth scope contains a name and a scope that you must get from the provider's specification, such as a read scope or a write scope. Each scope must be defined separately.\n\n5.  Select OAuth Entity Resources to define all OAuth resources this OAuth provider.\n\n6.  Select **Submit**.\n\n\n"}}