My OWSTIMER.EXE process is running under network service.
I have a certain timer job that should perform the following actions:
- Add taxonomy terms to a certain term store
- Add items to a certain sharepoint list, located in a certain sharepoint site.
While this alone isn't rocket science, the timer job runs under the same principal as the OWSTimer.exe process, so in other words network service.
Obviously I don't want the network service account to have permissions to manage a taxonomy term store, neither SharePoint lists, so I had already setup an account to do this.
How can I run blocks of code in my timer job under this account I created which should have access to the term store and sharepoint lists?