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
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?
%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.
Cedric,
Take a look at the server migration guide which contains a list of other items you can export.
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=AMIG
You can use the Security.Users.Export() method to export programmatically.