Architecting, installing and maintaining your SAS environment

proc metadata error

Accepted Solution Solved
Reply
Contributor
Posts: 31
Accepted Solution

proc metadata error

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


Accepted Solutions
Solution
‎05-13-2015 08:51 AM
Frequent Contributor
Posts: 121

Re: proc metadata error

Posted in reply to MarkNicholas

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


All Replies
Solution
‎05-13-2015 08:51 AM
Frequent Contributor
Posts: 121

Re: proc metadata error

Posted in reply to MarkNicholas

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

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 402 views
  • 0 likes
  • 2 in conversation