SPWebApplication.GrantAccessToProcessIdentity Method (String)

Grants the specified process identity account access to the Web application based on the username. Access to the process identity provides the permissions that are specified in the policy role parameter.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

public void GrantAccessToProcessIdentity(
	string username


Type: System.String

A string that contains the name of the user.

This method allows you to use an account to access the SharePoint object model from your own application.