|
Macros for SAS Application Developers
https://github.com/sasjs/core |
Creates a dataset with a list of group members. More...
Go to the source code of this file.
First, be sure you have an access token (which requires an app token)
Using the macros here:
filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas"; %inc mc;
Now we can run the macro!
%mv_getgroupmembers(All Users)
outputs:
ordinal_root num, ordinal_items num, version num, id char(256), name char(256), providerId char(32), implicit num, type char(32)
type is the member type (user or group) and is declared on every path. implicit is declared so a caller reading it does not fail with "Variable implicit not found", but the identities API returns no such field, so the column is present and always missing. A group with no members, and a group id the server does not know, both return the columns above with zero rows.
| [in] | group | Group id for which to return group members |
| [in] | access_token_var= | (ACCESS_TOKEN) The global macro variable to contain the access token |
| [in] | grant_type= | (sas_services) valid values are "password" or "authorization_code" (unquoted). |
| [out] | outds= | (work.viyagroupmembers) The library.dataset to be created that contains the list of members |
id and name are declared at $256, the longest active directory can hold for a display name or a SAM account name. The $43 they used to carry truncated anything longer, and a truncation fails the step on some platforms.
Definition in file mv_getgroupmembers.sas.