User Sessions - Disconnect

Disconnect a userSession.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect?api-version=2022-02-10-preview

URI Parameters

Name In Required Type Description
hostPoolName
path True

string

The name of the host pool within the specified resource group

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

sessionHostName
path True

string

The name of the session host within the specified host pool

subscriptionId
path True

string

The ID of the target subscription.

userSessionId
path True

string

The name of the user session within the specified session host

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

Successfully disconnected user session.

Other Status Codes

CloudError

Automation error response describing why the operation failed.

Examples

UserSession_Disconnect_Post

Sample Request

POST https://management.azure.com/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com/userSessions/1/disconnect?api-version=2022-02-10-preview

Sample Response

Definitions

Name Description
CloudError

Cloud error object.

CloudErrorProperties

Cloud error object properties.

CloudError

Cloud error object.

Name Type Description
error

CloudErrorProperties

Cloud error object properties.

CloudErrorProperties

Cloud error object properties.

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.