Thursday, March 13, 2014

Creating a user with the SDL Tridion Core Service

I was at a new project this week creating a Tridion user for a developer in the team while discovering that the CME could not list the domain users. This can happen when the MTSuser does not have access to the domain. A simple Core Service tool helped out once again. This command line application creates a user, without lookup in the active directory. I needed only one user so I just ran it from Visual Studio. 

Other versions
This is for SDL Tridion 2013 SP1, for previous versions (Tridion 2011 and up) you might have to use another configuration name (basicHttp_2013 in this case) and replace the contents of the app.config with Tridion.ContentManager.CoreService.Client.dll.config. In the app.config you can update the url for the basicHttp_2013 endpoint to match the hostname of your Tridion Content Manager server. 

Code

PowerShell
Before using the Visual Studio solution I tried to create the user with the tridion-powershell-modules, I could not get that one to work due to some error but it is the best way to do this task: It supports all Tridion versions and no Visual Studio and bespoke command line applications needed.

No comments:

Post a Comment