GrantAccessToProcessIdentity – A very handy SharePoint PowerShell command!

GrantAccessToProcessIdentity – A very handy SharePoint PowerShell command!

I thought I’d do a write up on this one as its something that always catches me out every time I’m configuring a SharePoint farm.

If you are setting up services e.g. Excel Services or Office Web Apps then it’s likely you will need to grant the service account running the service application permissions on your Content DBs.

Unfortunately it seems that SharePoint doesn’t do this for you when provisioning the Service App and you end up getting an error in the event logs when you try and use the service. The error is as follows -

In order to fix this you need to run the GrantAccessToProcessIdentity command for the web application in question. To do this use the PowerShell below -

[code lang="powershell"] $webApp = Get-SPWebApplication http://cyclops

$webApp.GrantAccessToProcessIdentity("TECHTOOLBOX\svc-spserviceapp")[/code]

The access should now be granted and you should be able to use the service application.

Hope this helps! Smile

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">