SPDatabase.GrantAccess Method (SecurityIdentifier, String)

Grants the specified user access to the database and adds the user to the specified role.

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

Syntax

'Declaration
Protected Friend Sub GrantAccess ( _
    sid As SecurityIdentifier, _
    role As String _
)
'Usage
Dim sid As SecurityIdentifier
Dim role As String

Me.GrantAccess(sid, role)
protected internal void GrantAccess(
    SecurityIdentifier sid,
    string role
)

Parameters

  • role
    Type: System.String

    The Microsoft SQL Server role in which to add the user.

See Also

Reference

SPDatabase Class

SPDatabase Members

GrantAccess Overload

Microsoft.SharePoint.Administration Namespace