Share via


Conversation.Impersonate Method

Impersonate as a different user.

Namespace:  Microsoft.Rtc.Collaboration
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Sub Impersonate ( _
    uri As String, _
    phoneUri As String, _
    displayName As String _
)
'Usage
Dim instance As Conversation
Dim uri As String
Dim phoneUri As String
Dim displayName As String

instance.Impersonate(uri, phoneUri, displayName)
public void Impersonate(
    string uri,
    string phoneUri,
    string displayName
)

Parameters

  • uri
    Type: System.String
    The URI of the user to impersonate. Required.
  • phoneUri
    Type: System.String
    The tel URI of the user to impersonate. Optional.
  • displayName
    Type: System.String
    The display name of the user to impersonate. Optional.

Exceptions

Exception Condition
ArgumentException

Thrown when the uri parameter value is null, empty or invalid.

ArgumentException

Thrown when the phoneUri parameter value is invalid.

InvalidOperationException

Thrown when this method is invoked on a UserEndpoint or if the current state of the conversation is neither Idle nor Incoming.

Remarks

This is allowed only when using an ApplicationEndpoint. The method can only be called when the conversation state is Idle or Incoming.

See Also

Reference

Conversation Class

Conversation Members

Microsoft.Rtc.Collaboration Namespace