BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SatishR
Obsidian | Level 7
I am trying to register a new OAuth client in our SAS Viya 3.5 environment using the following command:
curl -k -X POST "https://Host_Name/SASLogon/oauth/clients" \
-u "sas:xxxxxxxx" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"client_id": "myapi",
"client_secret": "Admin@12345",
"scope": ["openid"],
"authorized_grant_types": ["client_credentials", "refresh_token"]
}'

 

 
However, I am consistently receiving the below error:
 
{"error":"unauthorized","error_description":"Full authentication is required to access this resource"}
1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ
You need to get an oauth token before you can create a client. This request is failing because you are not providing an authorization header.
This blog explains the process well, you are performing step 2 there without having performed step 1.
https://blogs.sas.com/content/sgf/2023/02/07/authentication-to-sas-viya/
--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

1 REPLY 1
gwootton
SAS Super FREQ
You need to get an oauth token before you can create a client. This request is failing because you are not providing an authorization header.
This blog explains the process well, you are performing step 2 there without having performed step 1.
https://blogs.sas.com/content/sgf/2023/02/07/authentication-to-sas-viya/
--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 151 views
  • 1 like
  • 2 in conversation