Метод UserCollection.Add
Adds the user specified by the user creation information parameter to the collection.
Пространство имен: 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 Add ( _
parameters As UserCreationInformation _
) As User
'Применение
Dim instance As UserCollection
Dim parameters As UserCreationInformation
Dim returnValue As User
returnValue = instance.Add(parameters)
public User Add(
UserCreationInformation parameters
)
Параметры
parameters
Тип: Microsoft.SharePoint.Client.UserCreationInformationA UserCreationInformation object that contains information associated with the user.
It must not be пустая ссылка (Nothing в Visual Basic).
Возвращаемое значение
Тип: Microsoft.SharePoint.Client.User
A User object that represents the user to add.
Исключения
Исключение | Условие |
---|---|
SPException | The user does not exist or the user is not unique. Error code: -2130575276. The collection is read-only. Error code: -1. |
SecurityException | The collection is the farm administrators group and the specified user is not an administrator. Error code: -1. |
UnauthorizedAccessException | The current user does not have permissions to perform the action. Error code: -2147024891. |