To add a taxonomy-Column to a List I try to add a new TermSet in the default Termstore. This is the code:
TermStore termStore = session.GetDefaultSiteCollectionTermStore();
clientContext.Load(termStore);
TermSetCollection termSets = termStore.GetTermSetsByName(TermSetName, lcid);
clientContext.Load(termSets);
clientContext.ExecuteQuery();
if (termSets==null || termSets.Count==0)
{
var termGroup = termStore.GetTermGroupByName(TaxonomyGroup);
if (termGroup == null)
{
termGroup = termStore.CreateTermGroup(TaxonomyGroup);
}
termSetId = Guid.NewGuid();
TermSet termSetColl = termGroup.CreateTermSet(TermSetName, termSetId, lcid);
}
On CreateTermGroup() I receive a "Permission denied" error for my Add-In.
I already added write-Permissions to the taxonomy in my manifest:
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="FullControl" />
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />
<AppPermissionRequest Scope="http://sharepoint/taxonomy" Right="Write" />
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />
</AppPermissionRequests>
What additional permission do I need?