Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

OAuth parameters for default profile support

OAuth parameters for default profile support

The default profile feature requires 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 tell 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.

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 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 (see Specify an OAuth profile).

You do not need to use parameters to set the grant type and scope because the values are configured in the OAuth profile record. If you do not use the parameters, you can use the GlideOAuthClientRequest API methods setScope and setGrantType. For additional information, refer to setScope and setGrantType.