1 Reply Latest reply on May 2, 2018 3:19 AM by Manish Patil

    Service Now  - vRA Plugin issue

    bsnvmw Novice

      Hi folks, I am working at client site where Service Now consultant is having issues with the tokens. Following is the email from him can some one help?

       

      "I am trying to replicate the functionality that the vRA Plugin uses for User authentication.

      When a user logs into ServiceNow, there is some functionality in the plugin that automatically requests tokens specific for the logged in User.

       

      First, a client-side redirect sends the User to this URL: https://tuvra.transurban.com.au/SAAS/t/vsphere.local/auth/oauth2/authorize?response_type=code&client_id=tu-vra-snc&redirect_uri=https://transurbandev.service-now.com/vra_vidm_landpage.do

       

      It returns a code that looks like this: EkbrUZ6JHWm27XHXaYfOfOlzaIhiOdFJ

       

      Then a server-side REST call is made to this endpoint: https://tuvra.transurban.com.au/SAAS/t/vsphere.local/API/1.0/oauth2/token?grant_type=authorization_code&code=EkbrUZ6JHWm27XHXaYfOfOlzaIhiOdFJ&redirect_uri=https://transurbandev.service-now.com/vra_vidm_landpage.do

       

      This REST call should return an Access Token and a Refresh Token that are specific to the logged in User.

       

      The response I keep getting is

      {

      "error": "invalid_grant",

      "error_description": "Invalid verification code: EkbrUZ6JHWm27XHXaYfOfOlzaIhiOdFJ :Unable to get authorization code: code not found"

      }

       

      Can you see any reason why this keeps failing?"

      Any help is much appreciated