OAuth parameters for default profile support

The default profile feature require a set of parameters that you can use with the setParameter() API to specify the oauth requestor, a context for the request, and the provider profile.

In the OAuth provider scenario, you must set three parameters that tells the OAuth provider which OAuth profile to use by default. When these three parameters are set, the access token is saved in the instance database. Use these parameters with GlideOAuthClientRequest.

These parameters are available starting with the Geneva release.

Table 1. OAuth parameters for default profile support
Parameter Description
oauth_requestor The Sys ID of the object, which can be a user record or an email account.
oauth_requestor_context A descriptor that provides context for the oauth requestor. As a good practice, use the name of the table where the oauth_requestor object is saved.
oauth_provider_profile The Sys ID of the OAuth profile record that is the default.

You do not need to set the grant type and scope using parameters. These items are configured in the OAuth profile record. If you do not use these parameters, you can use the setScope and setGrantType methods. See the GlideOAuthClientRequest setScope method and setGrantType methods. Access the API on the developer portal at https://developer.servicenow.com.