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
Hi Martin,
Try this instead, it should work.
<Person Id="A5NUQPXO.AP00002V"> <IdentityGroups> <IdentityGroup ObjRef="A5NUQPXO.A500001C" /> </IdentityGroups> </Person>
Nik
Hi Martin,
Try this instead, it should work.
<Person Id="A5NUQPXO.AP00002V"> <IdentityGroups> <IdentityGroup ObjRef="A5NUQPXO.A500001C" /> </IdentityGroups> </Person>
Nik
Thank you very much Nik! It worked!
Is there a documentation about these XMLs somewhere or how/where did you figure it out?
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.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
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.