Authentication with Password Grant Type
You can use the Password grant when there is a trust relationship between the user and the application.
Authenticate to ServiceNow from a Desktop or Web Application
When authenticating thrugh PASSWORD grant type you need to set the following connectiono properties:
- AuthScheme: Set this to OAuthPassword.
- InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken connection property.
- OAuthClientId: Set this to your clientId.
- OAuthClientSecret: Set this to your clientSecret.
- Username: Set this to the username.
- Password: Set this to the user's password.
- Url: Set the base URL of your ServiceNow instance site.
- Extracts the access token from the CallbackURL.
- Obtains a new access token when the old one expires.
- Saves OAuth values along with geolocation in OAuthSettingsLocation, which is persistant across connections.