<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to create a macro to create a new metadata user account and add it into one or more sas grou in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758623#M239569</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/391744"&gt;@Tom2021&lt;/a&gt;&amp;nbsp; - Have you reviewed the whole process in&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;'s link? You need to run the macros that compare your external security data with SAS metadata, then only apply the changes that are found.&lt;/P&gt;</description>
    <pubDate>Sat, 31 Jul 2021 22:55:17 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-07-31T22:55:17Z</dc:date>
    <item>
      <title>how to create a macro to create a new metadata user account and add it into one or more sas groups?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758578#M239548</link>
      <description>&lt;P&gt;Hi, could some help me or provide some sample code? We want to use it in Ansible automation to automatically generate user account, instead of sas management console. thanks&lt;/P&gt;&lt;P&gt;%macro meta_create_user(username, login=, memberof=);&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;%macro meta_create_user(testuserFN testuserLN, login=testuser1, memberof=testgroup1); or&lt;/P&gt;&lt;P&gt;%macro meta_create_user(testuserFN testuserLN, login=lestuser1, memberof=(testgroup1,testgroup2));&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jul 2021 04:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758578#M239548</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-07-31T04:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758580#M239550</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/391744"&gt;@Tom2021&lt;/a&gt;&amp;nbsp;Before trying to write your own macro from scratch you might want to inspect what's already provided in the docu under &lt;A href="https://documentation.sas.com/doc/en/bicdc/9.4/bisecag/p02wesbzrochnbn1na7fqdy2gdvo.htm" target="_self"&gt;User Import Macros&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jul 2021 07:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758580#M239550</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-07-31T07:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758619#M239565</link>
      <description>&lt;P&gt;thanks Patrick, but, i tried&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/bicdc/9.4/bisecag/n0s5720n7tlwtfn1lkqx68z0bu82.htm" target="_blank" rel="noopener"&gt;%MDUCHGLB User Import Macro&lt;/A&gt;&amp;nbsp;that cannot add user into existing group; all users and groups should be new from ad/unix/other external. they cannot have same names in metadata repository. i like to do more investigation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jul 2021 22:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758619#M239565</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-07-31T22:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758623#M239569</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/391744"&gt;@Tom2021&lt;/a&gt;&amp;nbsp; - Have you reviewed the whole process in&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;'s link? You need to run the macros that compare your external security data with SAS metadata, then only apply the changes that are found.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jul 2021 22:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758623#M239569</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-07-31T22:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758635#M239578</link>
      <description>To add a user to a group you can try this macro:  &lt;A href="https://core.sasjs.io/mm__adduser2group_8sas.html" target="_blank"&gt;https://core.sasjs.io/mm__adduser2group_8sas.html&lt;/A&gt;</description>
      <pubDate>Sun, 01 Aug 2021 08:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758635#M239578</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-08-01T08:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758637#M239579</link>
      <description>&lt;P&gt;In the examples directory of the SAS installation, you can find two programs (importpw.sas and importad.sas) that synchronize the metadata either with the UNIX passwd/group files or an Active Directory (LDAP) source. They manage everything (adding users/groups, add in users to existing groups, apply changes to existing users/groups, remove groups or users).&lt;/P&gt;
&lt;P&gt;We have used both programs as blueprints for our sync needs, and they work perfectly.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Aug 2021 10:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758637#M239579</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-08-01T10:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758650#M239585</link>
      <description>I found the macro files written by Andrea Defronzo on github as the link; Tested, it is good, but I am not sure we can use the programs without copyright issue. At bottom, it calls sas metadata interface function. The coding is complicated with groups of sas macros. it is hard to learn and modify to create our codes. GitHub - andrewdef/sas_metadata_x_ansible: Ansible task to create SAS metadata objects (libraries, folders, etc.) in the Metadata Server&lt;BR /&gt;Ansible task to create SAS metadata objects (libraries, folders, etc.) in the Metadata Server&lt;BR /&gt;metautil_create_user.sas (%macro metautil_create_user(user_name, display_name=, login=, member_of=);). It calls these macros: metautil_parse_object_string.sas, metautil_create_object.sas&lt;BR /&gt;metautil_create_directory.sas, util_get_nobs.sas&lt;BR /&gt;</description>
      <pubDate>Sun, 01 Aug 2021 13:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758650#M239585</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-08-01T13:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758651#M239586</link>
      <description>&lt;P&gt;add the link: thx&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/andrewdef/sas_metadata_x_ansible" target="_blank"&gt;GitHub - andrewdef/sas_metadata_x_ansible: Ansible task to create SAS metadata objects (libraries, folders, etc.) in the Metadata Server&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Aug 2021 13:59:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758651#M239586</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-08-01T13:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758652#M239587</link>
      <description>thank you Allan. i will try your codes. I have a concern. if it is working, I believe, Can we use some of your sas files? it is hard to develop so many professional macros as a full module.. thx</description>
      <pubDate>Sun, 01 Aug 2021 14:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758652#M239587</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-08-01T14:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758653#M239588</link>
      <description>thank you Kurt. in our case, we do not need to import information from ad or unix; I will read the sas code and will try to modify it. thx</description>
      <pubDate>Sun, 01 Aug 2021 14:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758653#M239588</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-08-01T14:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758654#M239589</link>
      <description>thank you SASKivi, it is a full document. I read some and tried some. I will go further...thx</description>
      <pubDate>Sun, 01 Aug 2021 14:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758654#M239589</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-08-01T14:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758655#M239590</link>
      <description>thank you Patrick. This is a good direction. it is a full document. I will read it again and try to figure out testing plan to fit our custom need. thx</description>
      <pubDate>Sun, 01 Aug 2021 14:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758655#M239590</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-08-01T14:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758664#M239594</link>
      <description>&lt;P&gt;The programs consist of two parts: first extracting the user/group data from the source into a miniature database, and second creating a mirror base from the metadata, which is compared, resulting in a set of datasets for deleting, changing and adding metadata objects.&lt;/P&gt;
&lt;P&gt;As long as you create the database correctly, the rest of the programs should work.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Aug 2021 17:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758664#M239594</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-08-01T17:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758679#M239604</link>
      <description>&lt;P&gt;Thank you Allan,&lt;/P&gt;&lt;P&gt;I read and tested your macro code. it is beautiful. it worked&amp;nbsp;very well to add an existing user into specified groups. Could I use your macro file&amp;nbsp;mm_adduser2group.sas?&lt;/P&gt;&lt;P&gt;My outstanding question or task is to create a macro to create a new user with user name and login id.&lt;/P&gt;&lt;P&gt;In the same time, I will try another approach suggested in the communication thread to use bulk load and sas macro %mduchgbl. Finally, I will choose the simpler one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 00:04:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758679#M239604</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-08-02T00:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758706#M239612</link>
      <description>Yes of course- all the macros in the sasjs/core repo are MIT open source&lt;BR /&gt;and available for commercial use.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Aug 2021 06:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/758706#M239612</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-08-02T06:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a macro to create a new metadata user account and add it into one or more sas grou</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/759032#M239778</link>
      <description>&lt;P&gt;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&amp;nbsp;&lt;SPAN&gt;%macro meta_create_user(testuserFN testuserLN, login=testuser1). the user will be added in DefaultAuth.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* purpose: create a new user with&lt;BR /&gt;name=testfirst0 testlast0,&lt;BR /&gt;loginid=testuser0 in DefaultAuth,&lt;BR /&gt;do not touch group&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Initialize the macro variables that create canonical tables. */&lt;BR /&gt;%mduimpc();&lt;/P&gt;&lt;P&gt;/* Create the person table. */&lt;BR /&gt;data &amp;amp;persontbla ;&lt;BR /&gt;%definepersoncols;&lt;BR /&gt;infile datalines delimiter=',' missover;&lt;BR /&gt;input keyid name description title;&lt;BR /&gt;datalines;&lt;BR /&gt;testuser0,testfirst0 testlast0,,&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;/* Create the phone table. */&lt;BR /&gt;data &amp;amp;phonetbla ;&lt;BR /&gt;%definephonecols;&lt;BR /&gt;infile datalines delimiter=',' missover;&lt;BR /&gt;input keyid phoneNumber phoneType;&lt;BR /&gt;datalines;&lt;BR /&gt;testuser0,,&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;/* Create the location table. */&lt;BR /&gt;data &amp;amp;locationtbla ;&lt;BR /&gt;%definelocationcols;&lt;BR /&gt;infile datalines delimiter=',' missover;&lt;BR /&gt;input keyid locationName locationType address city postalcode area&lt;BR /&gt;country;&lt;BR /&gt;datalines;&lt;BR /&gt;testuser0,,,,,,,&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;/* Create the email table. */&lt;BR /&gt;data &amp;amp;emailtbla ;&lt;BR /&gt;%defineemailcols;&lt;BR /&gt;infile datalines delimiter=',' missover;&lt;BR /&gt;input keyid emailAddr emailtype;&lt;BR /&gt;datalines;&lt;BR /&gt;testuser0,,&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;/* Create the idgrp table. */&lt;BR /&gt;data &amp;amp;idgrptbla ;&lt;BR /&gt;%defineidgrpcols;&lt;BR /&gt;infile datalines delimiter=',' missover;&lt;BR /&gt;input keyid name description grpType;&lt;BR /&gt;datalines;&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;/* Create the grpmems table. */&lt;BR /&gt;data &amp;amp;idgrpmemstbla;&lt;BR /&gt;%defineidgrpmemscols;&lt;BR /&gt;infile datalines delimiter=',' missover;&lt;BR /&gt;input grpkeyid memkeyid;&lt;BR /&gt;datalines;&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;/* Create the authdomain table. */&lt;BR /&gt;data &amp;amp;authdomtbla;&lt;BR /&gt;%defineauthdomcols;&lt;BR /&gt;infile datalines delimiter=',' missover;&lt;BR /&gt;input keyid authDomName;&lt;BR /&gt;datalines;&lt;BR /&gt;A001,DefaultAuth&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;/* Create the logins table. */&lt;BR /&gt;data &amp;amp;logintbla;&lt;BR /&gt;%definelogincols;&lt;BR /&gt;infile datalines delimiter=',' missover;&lt;BR /&gt;input keyid userid password authdomkeyid;&lt;BR /&gt;datalines;&lt;BR /&gt;testuser0,testuser0,,A001&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;/* Load the information from the work library into the metadata server. */&lt;BR /&gt;%mduimplb();&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 14:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-macro-to-create-a-new-metadata-user-account-and/m-p/759032#M239778</guid>
      <dc:creator>Tom2021</dc:creator>
      <dc:date>2021-08-03T14:18:14Z</dc:date>
    </item>
  </channel>
</rss>

