I am trying to setup a SharePoint Online Site Collection 100% programmatically via the CSOM in a .Net application.

I have been able to create the Site Collection itself, sub-sites and lists, but I am unable to create a new Taxonomy Group and Sets since my user is not assigned as the Term Store Administrator. If I assign myself as the Term Store Administrator through the Term Store Management Tool UI my code works exactly as I need it to.

Is there a way to assign a user as the Term Store Administrator only using the c# object model? Assume the context is running under a user that has sufficient rights to do this.

1 Answer 1


AFAIK there is no way to assign a user as TermStore Administrator using CSOM. But one thing you could do is to create a new user (similar to service account) and make that user TermStore Administrator. Run the code to create term group under the context of that user.

using (ClientContext clientContext = new ClientContext("https://yoursite.sharepoint.com/"))
    SecureString passWord = new SecureString();

    foreach (char c in "yourpassword".ToCharArray()) passWord.AppendChar(c);

    clientContext.Credentials = new SharePointOnlineCredentials("[email protected]", passWord);//Pass credentials of the new user you have created
  • 1
    I support that. There is no way. I even check the api myself in SharePoint and I couldn't find any sign of such a function. Better say that it's not possible even thow it's not the expected answere. Nov 10, 2015 at 20:51
  • This doesn't really work because I'm not controlling the SharePoint instance I want to use. But since you did answer the question (even with the negative) I'll give you the bounty.
    – Steve
    Nov 11, 2015 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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