Getting error "User not Authenticated" when trying to make REST calls using OAuth 2.0 with okta

rajkumar5
Tera Contributor

1) I have created new application in okta .Attached screenshot in below :

find_real_file.png

find_real_file.png

2) And i've created OIDC Provider configuration in servicenow instance and configured client id and secret which is copied from Okta.

 And enabled "User Provisioning"find_real_file.png

find_real_file.png

And in the OIDC Provider Configuration User Claim "email" is mapped to sys_user field (Email).

find_real_file.png

I've also created a user, where the Email field contains the value of my Okta user email value. I've also added some roles(include admin,security admin,api access ) to the user.

find_real_file.png

I have got the access token from Okta but when i send this to inbound table API GET method, i'm getting error message


"error": {
"message": "User Not Authenticated",
"detail": "Required to provide Auth information"
},
"status": "failure"
}

find_real_file.png

Could you please help me on this issue?

Thanks!

1 ACCEPTED SOLUTION

can you please show me the user account cuz its working for me here are my setting for user provisiong on application registery.

i would recommend you to delete the user account and configure the following settings and dont forget to use the id_token

find_real_file.png

here is the data srouce configuration

find_real_file.png 

 

here is the transform map configuration 

find_real_file.png

 

 

thanks 

Hammad

View solution in original post

19 REPLIES 19

Leo Joseph
ServiceNow Employee
ServiceNow Employee

Hi Mageshkumar,

 

Review below KB,

 

How to set up OIDC provider on ServiceNow instance

https://hi.service-now.com/kb_view.do?sysparm_article=KB0778342

 

Regards,

Leo Joseph.

Leo,

Followed the above steps to configure the OIDC, but still i'm getting "User Not Authenticated" error. 

RaghavSh
Kilo Patron

@mageshkumar were you able to resolve this issue, I am getting the same with same configuration.


Raghav
MVP 2023

@Göran Lundqvist Can you please help.


Raghav
MVP 2023