返回与指定的主体 ID 相关联的角色分配
命名空间: Microsoft.SharePoint.Client
程序集: Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中); Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中) Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)
语法
声明
Public Function GetByPrincipalId ( _
principalId As Integer _
) As RoleAssignment
用法
Dim instance As RoleAssignmentCollection
Dim principalId As Integer
Dim returnValue As RoleAssignment
returnValue = instance.GetByPrincipalId(principalId)
public RoleAssignment GetByPrincipalId(
int principalId
)
参数
principalId
类型:System.Int3232 位整数,指定主体 id。
返回值
类型:Microsoft.SharePoint.Client.RoleAssignment
表示的角色分配的RoleAssignment对象。
异常
| 异常 | 条件 |
|---|---|
| ArgumentException | 在给定的范围集合中不存在的用户或组。错误代码 ︰-2147024809。 |
| UnauthorizedAccessException | 当前用户没有足够的权限来枚举父安全对象的权限。错误代码 ︰ 为-2147024891。 |