I'm trying to set security on the entities through the API but receive an error that the identifer must have an existing GUID:
Error code: 500010
Description: "An object identifier is required for model permission operations. The Identifier must have an existing GUID for create, update and clone operations."
I have a feeling my flow wrong (do I need to lookup the entity first?). Any suggestions?
Here's my code:
SecurityPrivilegesRequest request = new SecurityPrivilegesRequest(); request.Privileges = new SecurityPrivileges(); ModelPrivilege mp = new ModelPrivilege(); mp.ModelId = new Identifier { Name = "MyModel" }; mp.ObjectId = new Identifier { Name = "MyEntity" }; mp.ObjectType = ModelObjectType.Entity; mp.Permission = Permission.Update; mp.PrincipalType = PrincipalType.Group; Group mdsGroup = new Group(); mdsGroup = new Group(); mdsGroup.GroupType = GroupType.ActiveDirectoryGroup; mdsGroup.Identifier = new Identifier { Name = "myusergroup" }; mp.PrincipalId = mdsGroup.Identifier; request.Privileges.ModelPrivileges.Add(mp); SecurityCreateResponse response = mdsProxy.SecurityPrivilegesCreate(request);
Trevor