Condividi tramite


SPWebApplication.GrantAccessToProcessIdentity Method (String, SPPolicyRoleType)

Grants the specified process identity account access to the Web application based on the name of the user and the level of access. Access to the process identity provides full control of the SharePoint Web application.

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

Syntax

'Declaration
Public Sub GrantAccessToProcessIdentity ( _
    username As String, _
    policyRole As SPPolicyRoleType _
)
'Usage
Dim instance As SPWebApplication
Dim username As String
Dim policyRole As SPPolicyRoleType

instance.GrantAccessToProcessIdentity(username, _
    policyRole)
public void GrantAccessToProcessIdentity(
    string username,
    SPPolicyRoleType policyRole
)

Parameters

  • username
    Type: System.String

    A string that contains the name of the user.

See Also

Reference

SPWebApplication Class

SPWebApplication Members

GrantAccessToProcessIdentity Overload

Microsoft.SharePoint.Administration Namespace