We can access SDL Tridion User details through the UserData object, but can we also create Users and assign Roles using Core Services in 2011?

  • Yes - of course you can. If you have tried this and had trouble, please let us know what you tried and what the problems were. – Dominic Cronin Aug 13 '13 at 6:51

Of course you can:

var user = (UserData) ClientAdmin.GetDefaultData(ItemType.User, null, new ReadOptions());
user.Title = "domain\\user";
user.Description = "My new user";

user.GroupMemberships = new[]
    new GroupMembershipData
        Group = new LinkToGroupData {IdRef = groupId},
        Scope = new[]
            new LinkWithIsEditableToRepositoryData { IdRef = publication1Id },
            new LinkWithIsEditableToRepositoryData { IdRef = publication2Id },
user = (UserData) ClientAdmin.Create(user, new ReadOptions());

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.