Info Message{"error":{"message":"User Not Authenticated","detail":"Required to provide Auth informat

venkata sai alu
Tera Contributor

Hi,

 

I am able to get the access and refresh token for instance-to-instance integration, but I am getting this error: (Info Message

{"error": {"message": "User Not Authenticated", "detail": "Required to provide Auth information"}, "status": "failure"})
Kindly suggest any solution.
13 REPLIES 13

@venkata sai alu 

why are you setting the property with token?

why not use that token directly?

Also in header there should be space between Bearer and access token

It should be this

Bearer ${access_token}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

1.why not use that token directly?

Here my access token will expire shortly so whenever I create incident it will trigger Business rule to call script include, I need new access token. so, I am setting my refresh token in property, to get from property to generate access token in another function.

 

2.Bearer ${access token}?

I changed it.

 

3.DId I need to configure in Rest API access policies? because still i am getting the same error.

 

Instance A:

venkatasaialu_0-1737612694857.png

Instance B: (this instance providing endpoint to connect with Instance A)

 

venkatasaialu_1-1737612741650.png

 

 

 

 

@venkata sai alu 

you have created REST API access policies in target instance?

why to store refresh token in property?

Every time you make a call to get token use the access token directly in your next script, you need not store refresh token

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

1.you have created REST API access policies in target instance?

NO

venkatasaialu_0-1737618922117.png

2.Kindly tell me how to configure REST API polices in target instance,

whether for Table GET API Access Policy or Table POST API Access Policy what details should be provide in REST API, REST API PATH and Resource?

-->i am selecting Table API.

 

is Authorization profile is correct?  screenshot shared below.

venkatasaialu_1-1737619170013.png

 

3.Every time you make a call to get token use the access token directly in your next script, you need not store refresh token

--> sure, thanks.

 

@venkata sai alu 

there are 2 questions in your thread

1) why it's 401 error -> I already informed it's because of the token which you are using in 2nd API call

2) API access policy -> I haven't worked on it and haven't explored, so can't help much.

I believe I have provided solution/suggestion to your original question.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader