Edit

Share via


ChatRoomManagementServices.BeginAddUsersOrGroupsToRole Method

Definition

Adds the specified collection of users or user groups to the role on the chat room.

public:
 IAsyncResult ^ BeginAddUsersOrGroupsToRole(Microsoft::Rtc::Collaboration::PersistentChat::ChatRoomRole role, Uri ^ chatRoomUri, System::Collections::Generic::ICollection<Microsoft::Rtc::Collaboration::PersistentChat::Management::PersistentChatPrincipalSummary ^> ^ principals, AsyncCallback ^ userCallback, System::Object ^ state);
public IAsyncResult BeginAddUsersOrGroupsToRole (Microsoft.Rtc.Collaboration.PersistentChat.ChatRoomRole role, Uri chatRoomUri, System.Collections.Generic.ICollection<Microsoft.Rtc.Collaboration.PersistentChat.Management.PersistentChatPrincipalSummary> principals, AsyncCallback userCallback, object state);
member this.BeginAddUsersOrGroupsToRole : Microsoft.Rtc.Collaboration.PersistentChat.ChatRoomRole * Uri * System.Collections.Generic.ICollection<Microsoft.Rtc.Collaboration.PersistentChat.Management.PersistentChatPrincipalSummary> * AsyncCallback * obj -> IAsyncResult
Public Function BeginAddUsersOrGroupsToRole (role As ChatRoomRole, chatRoomUri As Uri, principals As ICollection(Of PersistentChatPrincipalSummary), userCallback As AsyncCallback, state As Object) As IAsyncResult

Parameters

role
ChatRoomRole

The role to which the users and user groups will be added.

chatRoomUri
Uri

The chat room URI.

principals
ICollection<PersistentChatPrincipalSummary>

A collection of users and user groups to add to the specified role.

userCallback
AsyncCallback

The method to be invoked when this asynchronous operation completes.

state
Object

An object to be passed back to the callback.

Returns

An IAsyncResult that references this operation.

Exceptions

chatRoomUri is not a valid chat room URI.

chatRoomUri or principals is null.

The chat server connection is not in a valid state to send the command.

The PersistentChatEndpoint encountered an error communicating with the chat server.

Remarks

All principals must meet eligibility requirements to be added to a role. To find eligible principals for a role, use BeginFindUsersOrGroupsForRole(ChatRoomRole, Uri, String, AsyncCallback, Object). This request will be processed asynchronously. See EndAddUsersOrGroupsToRole(IAsyncResult) to complete this asynchronous operation.

Applies to