Question
Cedric Daniels · Sep 24

User names and roles

is there a command line  function I can use to export the user file.  The names off all the  user in Health Share or Health Connect.  Export it into some type of flat file?

Product version: IRIS 2020.1
00
2 0 5 125
Log in or sign up to continue

%SYS>d ^SECURITY
  
1) User setup
2) Role setup
3) Service setup
4) Resource setup
5) Application setup
6) Auditing setup
8) SSL configuration setup
9) Mobile phone service provider setup
10) OpenAM Identity Services setup
11) Encryption key setup
12) System parameter setup
13) X509 User setup
14) KMIP server setup
15) Exit
 
Option? 1
 
1) Create user
2) Edit user
3) List users
4) Detailed list users
5) Delete user
6) Export users
7) Import users
8) Exit
 
Option?

Yes, in the %SYS namespace you can use the ^SECURITY utility. The export will be in XML format.

USER> zn "%SYS"

%SYS> d ^SECURITY

1) User setup
2) Role setup
3) Service setup
4) Resource setup
5) Application setup
6) Auditing setup
8) SSL configuration setup
9) Mobile phone service provider setup
10) OpenAM Identity Services setup
11) Encryption key setup
12) System parameter setup
13) X509 User setup
14) KMIP server setup
15) Exit

Option? 1

1) Create user
2) Edit user
3) List users
4) Detailed list users
5) Delete user
6) Export users
7) Import users
8) Exit

Option? 6

Is there a function we could use to pass in the parameters for "d ^SECURITY"

There's the Export() method in Security.Users ...

%SYS> set sc=##class(Security.Users).Export("/path/to/exportfile.xml")

Documentation is here.