BookmarkSubscribeRSS Feed
kaushalsolanki
Quartz | Level 8

Dear All,

 

I am creating users through metadata_newobj command line in SAS.

 

I wanted to know how i can add authentication domain and user id through the same command line. 

 

Thanks,

Kaushal Solanki

2 REPLIES 2
ronan
Lapis Lazuli | Level 10

Well, this requires some very good understanding of the Open Metadata Interface (OMI) hierarchical model beforehand... An easier way might be to reuse the so-called MDU* User Import macros : populate some SAS canonical tables then the macros will synchronise the change into metadata :

 

http://documentation.sas.com/?cdcId=bicdc&cdcVersion=9.4&docsetId=bisecag&docsetTarget=p02wesbzrochn...

 

http://support.sas.com/kb/40/628.html

 

See also http://support.sas.com/kb/64/976.html

 

Only a few Authentication Domains are needed in order to register user logins in metadata, generally you don't create or generate those on-the-fly like logins ; the SMC User Manager interface will suffice (right-click > Authentication Domains).

 

HTH

kaushalsolanki
Quartz | Level 8

Hey Ronan,

 

Thanks for the revert, i am already trying the same with canonical tables.

 

But in that as well i am facing one issue in which i am unable to add new users to existing group by using the attached code.

 

ERROR: The method is not directed at a repository. (The Reposid parameter is blank.)

/* Specify connection options. Use an unrestricted user ID. Port 8561 */
options metaserver=XXXXXX
metaport=8561
metauser="sas"
metapass="XXXXXXX"
metarepository="Foundation";
  
/* Initialize the macro variables that create canonical tables. */
%mduimpc();

/* Create the person table. */
data &persontbla;
     %definepersoncols;
     infile datalines delimiter=',' missover;
         input keyid name description title;  
    datalines;            
P00111,ichelle Harrell,Mgr of Operations,Sr. Mgr
P00121,red Granite,NE Region Acct. Rep.,Account Rep II
P00131,rian Davis,Accounting System Developer,Senior Programmer
;                       


/* Create the grpmems table. */
data &idgrpmemstbla;
     %defineidgrpmemscols;
     infile datalines delimiter=',' missover;
         input grpkeyid memkeyid;
    datalines;            
A5A86HMO.A500001O,P00111
A5A86HMO.A500001O,P00131
;
 

/* Create the authdomain table. */
data &authdomtbla;
     %defineauthdomcols;
     infile datalines delimiter=',' missover;
         input keyid authDomName;
    datalines;            
A5A86HMO.AR000001,DefaultAuth
; 

/* Create the logins table. */
data &logintbla;
     %definelogincols;
     infile datalines delimiter=',' missover;
         input keyid userid password authdomkeyid;  
    datalines;            
P00111,IDBIBANK.AD\114901, ,A5A86HMO.AR000001
P00121,IDBIBANK.AD\114902, ,A5A86HMO.AR000001
P00131,IDBIBANK.AD\114903, ,A5A86HMO.AR000001
; 

/* Load the information from the work library into the metadata server. */


%mduimplb();

 

Thanks,

Kaushal Solanki

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 976 views
  • 1 like
  • 2 in conversation