Sending additional parameters to the OAuth Provider to retrive the access and refresh tokens using GlideOAuthClient()Issue <!-- div.margin { padding: 10px 40px 40px 30px; } table.tocTable { border: 1px solid; border-color: #e0e0e0; background-color: #fff; } .title { color: #d1232b; font-weight: normal; font-size: 28px; } h1 { color: #d1232b; font-weight: normal; font-size: 21px; margin-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #cccccc; } h2 { color: #646464; font-weight: bold; font-size: 18px; } h3 { color: #000000; font-weight: bold; font-size: 16px; } h4 { color: #666666; font-weight: bold; font-size: 15px; } h5 { color: #000000; font-weight: bold; font-size: 13px; } h6 { color: #000000; font-weight: bold; font-size:14px; } ul, ol { margin-left: 0; list-style-position: outside; } --> Description Some OAuth providers require additional parameters to be sent in addition to standard parameters (grant_type,username, password , client_id , client_secret ) to issue access token and refresh token . This article explains how to send any additional parameters from the script . Procedure 0) Create the OAuth Provider record in ServiceNow instance with all the required values . 1) In the script , create a params string and include any additional parameters that the OAuth Provider expects . 2) For example if a parameter called "resource" needs to be sent , include it the the params variable . 3) Below is a sample code . var oAuthClient = new sn_auth.GlideOAuthClient(); var requestor_context = 'test'; var requestor_id = 'abc@xyz.com'; var oauth_profile_id = '<sys_od_of_oauth_profile>'; var params = {grant_type:'password', username:'abc@abc.com', password:'pa$$word', resource:'123-123-123', oauth_requestor_context:requestor_context, oauth_requestor:requestor_id, oauth_provider_profile:oauth_profile_id}; var json = new global.JSON(); var text = json.encode(params); var tokenResponse = oAuthClient.requestToken('<OAuth_Profile_Name>', text); var token = tokenResponse.getToken(); var access_token = token.getAccessToken() ; gs.log("AccessToken:" + access_token); gs.log("AccessTokenExpiresIn:" + token.getExpiresIn()); gs.log(" RefreshToken:" + token.getRefreshToken()); Applicable Versions All versions .