Production Ready Macros for SAS Application Developers
mv_getapptoken.sas File Reference

Get an App Token and Secret. More...

Go to the source code of this file.

Detailed Description

When building apps on SAS Viya, an app id and secret is required. This macro will obtain the Consul Token and use that to call the Web Service.

more info: https://developer.sas.com/reference/auth/#register and: http://proc-x.com/2019/01/authentication-to-sas-viya-a-couple-of-approaches/

The default viyaroot location is /opt/sas/viya/config

M3 required due to proc http headers

Usage:

filename mc url "https://raw.githubusercontent.com/Boemska/macrocore/master/macrocore.sas"; inc mc;

mv_getapptoken(client_id=client,client_secret=secret)

Parameters
client_id=The client name
client_secret=client secret
groups=List of groups of users who will have access to the app. space seperated. The user will be prompted for each of these when logging in.
grant_type=valid values are "password" or "authorization_code" (unquoted)
Version
SAS 9.4M3
Author
Allan Bowe https://github.com/Boemska/macrocore

Dependencies

Definition in file mv_getapptoken.sas.