I will suggest you to run client registration once again.
Before that you need to clear previously set ClientId and secret.
Below is the link to clear values of these 2 properties.
Once done, logout from servicenow, re-login to ServiceNow. Page redirection to vRA happens, enter credentials and you should redirect to ServiceNow back.
Once you are done with these steps, clear specific property value from below table and run scheduled jobs once again to re-import data.
Please ignore the previous message >
I have set up Client ID and Client secret and followed the steps you mentioned although still getting the same error.
I believe it is related to the userToken variable being passed from Servicenow to VMWare.
I see you are getting an error, but as you confirmed that clientId and clientSecret are being set, Can you try logging out of ServiceNow and relogin and perform import job run once again.
Let me know if you see any error in ServiceNow logs.
I have fixed this issue for now by updating the Business Rule : VRA Map access token to Requests
Root cause was that the token was not getting set as there is nothing from client side which sets the 'VRA_AUTH_TOKEN' mentioned in the Business Rule.
// Commented following line
//var token = gs.getSession().getClientData('VRA_AUTH_TOKEN');
// Added following line
var token = (new VRASNAuthGenerator()).getAuthToken();
The tokens which you are talking about are different.
i)VRA_AUTH_TOKEN is used to maintain specific user session and is stored in session.
ii)new VRASNAuthGenerator().getAuthToken() is used while making REST call to vRA platform.
I doubt you will be able to successfully provision a request as your session token is missing here.
Let me know if all good here.
Hi Manish ,
I followed the steps that you mentioned although that didn’t resolve the issue . We have not set up ADFS yet. Any idea whether the VRA_AUTH_TOKEN is set only after the ADFS is set up ? I found out that the root cause is the token variable not bing set on the requested item in Servicenow. Any idea how this variable is set ? I can see the line --- var token = gs.getSession().getClientData('VRA_AUTH_TOKEN') --- everywhere in the scripts however nothing to set the VRA_AUTH_TOKEN itself from client or server
We are testing only with one user whose credentials are same in Servicenow as well as VMware and this user is Admin in vRA.Therefore it works for this user.Let me know your throughts.
If ADFS is not there then vRA re-direction and authentication should happen post this authentication you should be redirected back to ServiceNow instance.
Is this happening in your case without ADFS?
Hi Manish , I have disabled the redirection as it was impacting all the other users irrespective of whether they wanted to request a machine for provisioning or not. They were being redirected to vRA for login. This is as designed although the plan was to test the functionality for POC and then enable ADFS.