Architecting, installing and maintaining your SAS environment

XML Metadata Interface Adding User to Group

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

XML Metadata Interface Adding User to Group

Hey there

 

I added a user to the SAS metadata using the XML Metadata Interface. In the "Add Metadata" tab, I used the following XML:

 

<Person Desc="" DisplayName="Testuser" IsHidden="0" Name="Testuser Test" Title="Tester"/>

 

This worked absolutely fine. Now I need to add the user to a group which is already existing in the metadata.

I tried the following in the "Update Metadata" tab:

 

<Person Id="A5NUQPXO.AP00002V">
            <IdentityGroups>
                <IdentityGroup Id="A5NUQPXO.A500001C" Name="REU" Desc="REU Reporting"/>
            </IdentityGroups>
</Person>

 

This didn't work and it responded with the following error:

Error:
com.sas.iom.SASIOMDefs.GenericError: The association from IdentityGroup : A5NUQPXO.A500001C to Person : A5NUQPXO.AP00002V cannot be created.
The association from IdentityGroup : A5NUQPXO.A500001C to Person : A5NUQPXO.AP00002V cannot be created.

 

 

The IDs should actually be correct. I used the Metadata browser in the SAS Foundation and copied the IDs from there.

 

Do you know how I can add a user to a group using the XML Metadata Interface?

 

 

Kind regards

Martin


Accepted Solutions
Solution
‎03-05-2018 02:36 AM
Frequent Contributor
Posts: 133

Re: XML Metadata Interface Adding User to Group

Hi Martin,

 

Try this instead, it should work.

 

<Person Id="A5NUQPXO.AP00002V">
  <IdentityGroups>
    <IdentityGroup ObjRef="A5NUQPXO.A500001C" />
  </IdentityGroups>
</Person>

 

Nik

View solution in original post


All Replies
Solution
‎03-05-2018 02:36 AM
Frequent Contributor
Posts: 133

Re: XML Metadata Interface Adding User to Group

Hi Martin,

 

Try this instead, it should work.

 

<Person Id="A5NUQPXO.AP00002V">
  <IdentityGroups>
    <IdentityGroup ObjRef="A5NUQPXO.A500001C" />
  </IdentityGroups>
</Person>

 

Nik

Occasional Contributor
Posts: 16

Re: XML Metadata Interface Adding User to Group

Posted in reply to boemskats

Thank you very much Nik! It worked!

Is there a documentation about these XMLs somewhere or how/where did you figure it out?

Frequent Contributor
Posts: 133

Re: XML Metadata Interface Adding User to Group

[ Edited ]

It's in the SAS docs here: http://documentation.sas.com/?docsetId=omaref&docsetTarget=n1ow0lbqw8ktpwn1e37i0p90jeaz.htm&docsetVe...

 

Most of the OMI documentation is awesome, there's just a lot of it. Quoting from the page I linked to:

The AddMetadata method creates a new object for every property string that is submitted in the <METADATA> element, unless the ObjRef attribute is included in the property string. ObjRef is supported only in a nested property string. It specifies that the object instance is an existing metadata object. It instructs the SAS Metadata Server to create an object reference to the specified object without modifying the specified object's other properties. 
 
Not sure how much this applies as you're updating metadata rather than adding. I dug it up from some old code, so I'm pretty sure my 'journey of discovery' was trial & error Smiley Happy
 
 
 
 
☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 183 views
  • 4 likes
  • 2 in conversation