Now we have solution from Allan to add user to groups; But, we want advice or sample code to create a new user in code like %macro meta_create_user(testuserFN testuserLN, login=testuser1). the user will be added in DefaultAuth.
I ran sample code from metadata import and bulkload as below. But, i found the new user account has blank at authdomain. it should be DefaultAuth.
We tested the program to add it into a group but failed; even if we setup external identify on the group. it seems the bulkload is to load all external accounts into metadata but the objects cannot have same names inside metadata repository.
thx
/* purpose: create a new user with
name=testfirst0 testlast0,
loginid=testuser0 in DefaultAuth,
do not touch group
*/
/* 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;
testuser0,testfirst0 testlast0,,
;
/* Create the phone table. */
data &phonetbla ;
%definephonecols;
infile datalines delimiter=',' missover;
input keyid phoneNumber phoneType;
datalines;
testuser0,,
;
/* Create the location table. */
data &locationtbla ;
%definelocationcols;
infile datalines delimiter=',' missover;
input keyid locationName locationType address city postalcode area
country;
datalines;
testuser0,,,,,,,
;
/* Create the email table. */
data &emailtbla ;
%defineemailcols;
infile datalines delimiter=',' missover;
input keyid emailAddr emailtype;
datalines;
testuser0,,
;
/* Create the idgrp table. */
data &idgrptbla ;
%defineidgrpcols;
infile datalines delimiter=',' missover;
input keyid name description grpType;
datalines;
;
/* Create the grpmems table. */
data &idgrpmemstbla;
%defineidgrpmemscols;
infile datalines delimiter=',' missover;
input grpkeyid memkeyid;
datalines;
;
/* Create the authdomain table. */
data &authdomtbla;
%defineauthdomcols;
infile datalines delimiter=',' missover;
input keyid authDomName;
datalines;
A001,DefaultAuth
;
/* Create the logins table. */
data &logintbla;
%definelogincols;
infile datalines delimiter=',' missover;
input keyid userid password authdomkeyid;
datalines;
testuser0,testuser0,,A001
;
/* Load the information from the work library into the metadata server. */
%mduimplb();