I have a multi tenant environment. Each tenant has a Content Type Hub site collection and a Root site collection. Using Visual Studio 2013, I created a Content Type and added a managed metadata column in it, which is also created through Visual Studio 2013 feature. In the feature activated event of the Site column, I am connecting the column to the appropriate term set in the Managed Metadata Store of the Content Type Hub site collection.
I am publishing the Content Type, through code in the Feature Activated event. Also, I am trying to run the Content Type Hub Job and the Content Type Subscriber Job through the Content Type's Feature Activated event. But this gives access denied exception.
I tried setting the RemoteAdministrator flag also, but no luck. But, if I publish the content type through UI and then run the jobs also from UI, it is working. Can anyone please explain this? Can anyone please throw some light on whether there is any special way to do this in a multi tenant environment. From UI, if I create a Content Type and publish it, it works, but from code, it doesn't.
Any help will be highly appreciated.