Share via


SPRole.ID Property

NOTE: This API is now obsolete.

Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization Object Model. (In Windows SharePoint Services 2.0, the ID property returned the member ID for the role and is maintained for backward compatibility.)

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

Syntax

'Declaration
<ObsoleteAttribute("Use the SPRoleDefinition class instead")> _
Public Overrides ReadOnly Property ID As Integer
    Get
'Usage
Dim instance As SPRole
Dim value As Integer

value = instance.ID
[ObsoleteAttribute("Use the SPRoleDefinition class instead")]
public override int ID { get; }

Property Value

Type: System.Int32
A 32-bit integer that specifies the member ID.

Remarks

The value of the ID property corresponds to the unique member ID for the role, which is contained in the ID property of the SPMember class.

See Also

Reference

SPRole Class

SPRole Members

Microsoft.SharePoint Namespace