BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MarkNicholas
Obsidian | Level 7

Dear,

In the process of automation, I am trying to use proc metadata to add a single user with the basic details to SAS Management Console with DefaultAuth domain.

My code:
filename _outxml "/localwork2/outxml.xml";
filename _respons "/localwork2/respons.xml";

proc metadata  in=_outxml out=_respons;
run;

My _outxml code which is input to upload in MC is as below

<AddMetadata>

<Metadata>

<Person Id="$U_99999999" Name="Automate_Name" Desc="99999999" PublicType="User" UsageVersion="1000000"  >

   <ExternalIdentities>

      <ExternalIdentity Name="Automate_Name" Identifier="U_99999999" Context="Passwd File Import" />

   </ExternalIdentities>

   <Logins>

      <Login  Name="99999999" Desc="Automate_Name login" Userid="99999999" >

         <Domain>

             <AuthenticationDomain ObjRef="DefaultAuth" />

         </Domain>

      </Login>

   </Logins>

</Person>

</Metadata>

<Reposid>XXXXX.XXXXXX7</Reposid>

<NS>SAS</NS>

<Flags>268435456</Flags>

<Options/>

</AddMetadata>

  When I run this, it fails with below error and user is not added.

ERROR.JPG

I tried to solve this by removing the Domain Information tag highlighted in blue above  and now the user is added this time ; but without Domain info DefaultAuth.

Authdomain.JPG

Why it fails when I try add with DefaultAuth .   While I can manually edit the user and add him under DefaultAuth domain,  I need  help with the DefaultAuth information also to be uploaded in MC by proc metadata.

Please help with the changes required. Thanks a lot in advance.

-Mark

1 ACCEPTED SOLUTION

Accepted Solutions
AndreasMenrath
Pyrite | Level 9

Hi Mark,

i think you are not using the reference to the Authentication Domain as intended.

See: SAS(R) 9.3 Open Metadata Interface: Reference and Usage Here the existing object is directly adressed by its metadata ID A53TPPVI.A1000001 and not its name.

So i suggest you lookup the ID of your DefaultAuth Domain and try this request:

<AddMetadata>

<Metadata>

<Person Id="$U_99999999" Name="Automate_Name" Desc="99999999" PublicType="User" UsageVersion="1000000"  >

   <ExternalIdentities>

      <ExternalIdentity Name="Automate_Name" Identifier="U_99999999" Context="Passwd File Import" />

   </ExternalIdentities>

   <Logins>

      <Login  Name="99999999" Desc="Automate_Name login" Userid="99999999" >

         <Domain>

             <AuthenticationDomain ObjRef="xxxxxxxx.yyyyyyyy" />

         </Domain>

      </Login>

   </Logins>

</Person>

</Metadata>

<Reposid>XXXXX.XXXXXX7</Reposid>

<NS>SAS</NS>

<Flags>268435456</Flags>

<Options/>

</AddMetadata>


-Andreas

View solution in original post

1 REPLY 1
AndreasMenrath
Pyrite | Level 9

Hi Mark,

i think you are not using the reference to the Authentication Domain as intended.

See: SAS(R) 9.3 Open Metadata Interface: Reference and Usage Here the existing object is directly adressed by its metadata ID A53TPPVI.A1000001 and not its name.

So i suggest you lookup the ID of your DefaultAuth Domain and try this request:

<AddMetadata>

<Metadata>

<Person Id="$U_99999999" Name="Automate_Name" Desc="99999999" PublicType="User" UsageVersion="1000000"  >

   <ExternalIdentities>

      <ExternalIdentity Name="Automate_Name" Identifier="U_99999999" Context="Passwd File Import" />

   </ExternalIdentities>

   <Logins>

      <Login  Name="99999999" Desc="Automate_Name login" Userid="99999999" >

         <Domain>

             <AuthenticationDomain ObjRef="xxxxxxxx.yyyyyyyy" />

         </Domain>

      </Login>

   </Logins>

</Person>

</Metadata>

<Reposid>XXXXX.XXXXXX7</Reposid>

<NS>SAS</NS>

<Flags>268435456</Flags>

<Options/>

</AddMetadata>


-Andreas

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
  • 1 reply
  • 1190 views
  • 0 likes
  • 2 in conversation