Impersonate as a different user.

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

Syntax

Visual Basic (Declaration)
Public 
Sub 
Impersonate ( _
	
uri 
As 
String, _
	
phoneUri 
As 
String, _
	
displayName 
As 
String _
)
C#
public 
void 
Impersonate(
	
string 
uri,
	
string 
phoneUri,
	
string 
displayName
)
Visual C++
public:
void 
Impersonate(
	
String^ 
uri, 
	
String^ 
phoneUri, 
	
String^ 
displayName
)
JavaScript
function 
impersonate(
uri, 
phoneUri, 
displayName);

Parameters

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

Remarks

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

Exceptions

Exception Condition
ArgumentException Thrown when the uriparameter value is null, empty or invalid.
ArgumentException Thrown when the phoneUriparameter value is invalid.
InvalidOperationException Thrown when this method is invoked on a UserEndpointor if the current state of the conversation is neither Idlenor Incoming.

See Also