You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faq.md
+23-4Lines changed: 23 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,17 +24,36 @@ A diagram of the rules for determining whether a local or remote target is used
24
24
25
25
## How can I obtain a Viya client and secret?
26
26
27
-
For setting up the client / secret you will need the services of an administrator (a user with admin rights on the physical machine) as they need to query a protected file (the consul token). The client must have the 'authorization_code' grant type. If you are building a standalone application, it is also recommended to increase the expiry period of the refresh token to avoid manual re-authentications. The default expiry is 24 hours for an access token, and 30 days for a refresh token. This can be extended up to around 60 or 70 years.
27
+
For setting up the client / secret you will need the services of an administrator (a user with admin rights on the physical machine) as they need to query a protected file (the consul token). The client must be created with the 'authorization_code' grant type. If you are building a standalone application, it is also recommended to increase the expiry period of the refresh token to avoid manual re-authentications. The default expiry is 24 hours for an access token, and 30 days for a refresh token. This can be extended up to around 60 or 70 years.
28
28
29
-
SASjs provides two tools to make this easy:
29
+
## Viya 2025
30
30
31
-
### Viya Token Web App
31
+
The latest instructions are available [here](https://developer.sas.com/docs/rest-apis/getting-started/authentication). Our recommended approach is to use the browser as follows:
32
+
33
+
1. Open the following url as an administrator: `https://<sas-server>/SASLogon/oauth/authorize?client_id=sas.cli&response_type=token`
34
+
2. This will redirect to a new url. Extract the `access_token` parameter and use it in the query below:
35
+
36
+
37
+
```bash
38
+
curl -k -X POST "https://viya-f0g8ht62vq.engage.sas.com/SASLogon/oauth/clients" \
This will create a YOUR_CLIENT and YOUR_SECRET client/secret pair using the authorization_code grant type (suitable for SASjs).
45
+
46
+
### Legacy Tools
47
+
48
+
SASjs provides two legacy tools for older versions of Viya:
49
+
50
+
**Viya Token Web App**
32
51
33
52
This is a web app for configuring a client & secret in multiple ways. Only valid for Viya 3.5
34
53
35
54
To deploy, see here: [https://sasjs.io/apps/#viya-client-token-generator](https://sasjs.io/apps/#viya-client-token-generator)
36
55
37
-
### Viya Token Macros
56
+
**Viya Token Macros**
38
57
39
58
You can also generate a client / secret (and access / refresh token) using SAS code, on both Viya 3.5 and Viya 4, using the [mv_registerclient](https://core.sasjs.io/mv__registerclient_8sas.html) macro.
0 commit comments