I have a console app that i used to connect to SP online to get termstore data:
ClientContext context = new ClientContext("https://site.sharepoint.com/"; SecureString passWord = new SecureString(); foreach (char c in "xxxxxx".ToCharArray()) passWord.AppendChar(c); context.Credentials = new SharePointOnlineCredentials("username", passWord);
TaxonomySession taxonomySession = TaxonomySession.GetTaxonomySession(context);
context.Load(taxonomySession, ts => ts.TermStores);
context.ExecuteQuery();
That works great and I can connect to the term store and get data no problem... now we have decided to move on prem. I still need to connect to the term store from a console app that will run outside of the SP environment.
I have added a user to the term store in both Central Admin and site settings.. .has full control..
I cannot figure out how to pass auth to SP to give me access.. .I just keep getting 401.
Any help would be appreciated.
sayitfast