Share via


Session Hosts - Get

Get a session host.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}?api-version=2024-04-03

URI Parameters

Name In Required Type Description
hostPoolName
path True

string

minLength: 3
maxLength: 64
pattern: ^[A-Za-z0-9@.\-_ ]*$

The name of the host pool within the specified resource group

resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

sessionHostName
path True

string

minLength: 3
maxLength: 48
pattern: ^[A-Za-z0-9@.\-_ ]*$

The name of the session host within the specified host pool

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

SessionHost

Successfully retrieved session host.

Other Status Codes

CloudError

Automation error response describing why the operation failed.

Examples

SessionHost_Get

Sample request

GET https://management.azure.com/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com?api-version=2024-04-03

Sample response

{
  "name": "sessionHost1.microsoft.com",
  "id": "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com",
  "type": "Microsoft.DesktopVirtualization/hostPools/sessionHosts",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "objectId": "7877fb31-4bde-49fd-9df3-c046e0ec5325",
    "lastHeartBeat": "2008-09-22T14:01:54.9571247Z",
    "sessions": 1,
    "agentVersion": "1.0.0.1391",
    "allowNewSession": true,
    "assignedUser": "user1@microsoft.com",
    "status": "Available",
    "statusTimestamp": "2008-09-22T14:01:54.9571247Z",
    "osVersion": "10.0.17763",
    "sxSStackVersion": "rdp-sxs190816002",
    "updateState": "Succeeded",
    "lastUpdateTime": "2008-09-22T14:01:54.9571247Z",
    "updateErrorMessage": "",
    "virtualMachineId": "29491b54-c033-4dec-b09a-18bf0ebafaef",
    "friendlyName": "friendly",
    "resourceId": "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.Compute/virtualMachines/sessionHost1",
    "sessionHostHealthCheckResults": [
      {
        "healthCheckName": "DomainJoinedCheck",
        "healthCheckResult": "HealthCheckSucceeded",
        "additionalFailureDetails": {
          "message": "SessionHost healthy: is joined to domain ≤wvdarmtest1.net≥",
          "errorCode": 0,
          "lastHealthCheckDateTime": "2021-01-14T02:09:37.6236843Z"
        }
      }
    ]
  }
}

Definitions

Name Description
CloudError

Cloud error object.

CloudErrorProperties

Cloud error object properties.

createdByType

The type of identity that created the resource.

HealthCheckName

Represents the name of the health check operation performed.

HealthCheckResult

Represents the Health state of the health check we performed.

SessionHost

Represents a SessionHost definition.

SessionHostHealthCheckFailureDetails

Contains details on the failure.

SessionHostHealthCheckReport

The report for session host information.

Status

Status for a SessionHost.

systemData

Metadata pertaining to creation and last modification of the resource.

UpdateState

Update state of a SessionHost.

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.

createdByType

The type of identity that created the resource.

Value Description
Application
Key
ManagedIdentity
User

HealthCheckName

Represents the name of the health check operation performed.

Value Description
AppAttachHealthCheck

Verifies that the AppAttachService is healthy (there were no issues during package staging). The AppAttachService is used to enable the staging/registration (and eventual deregistration/destaging) of MSIX apps that have been set up by the tenant admin. This checks whether the component had any failures during package staging. Failures in staging will prevent some MSIX apps from working properly for the end user. If this check fails, it is non fatal and the machine still can service connections, main issue may be certain apps will not work for end-users. (Currently Enabled)

DomainJoinedCheck

Verifies the SessionHost is joined to a domain. If this check fails is classified as fatal as no connection can succeed if the SessionHost is not joined to the domain. (Currently Enabled)

DomainReachable

Verifies the domain the SessionHost is joined to is still reachable. If this check fails is classified as fatal as no connection can succeed if the domain the SessionHost is joined is not reachable at the time of connection. (Currently Disabled)

DomainTrustCheck

Verifies the SessionHost is not experiencing domain trust issues that will prevent authentication on SessionHost at connection time when session is created. If this check fails is classified as fatal as no connection can succeed if we cannot reach the domain for authentication on the SessionHost. (Currently Enabled)

FSLogixHealthCheck

Verifies the FSLogix service is up and running to make sure users' profiles are loaded in the session. If this check fails is classified as fatal as even if the connection can succeed, user experience is bad as the user profile cannot be loaded and user will get a temporary profile in the session. (Currently Disabled)

MetaDataServiceCheck

Verifies the metadata service is accessible and return compute properties. (Currently Enabled)

MonitoringAgentCheck

Verifies that the required Geneva agent is running. If this check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is missing or running (possibly) older version. (Currently Enabled)

SupportedEncryptionCheck

Verifies the value of SecurityLayer registration key. If the value is 0 (SecurityLayer.RDP) this check fails with Error code = NativeMethodErrorCode.E_FAIL and is fatal. If the value is 1 (SecurityLayer.Negotiate) this check fails with Error code = NativeMethodErrorCode.ERROR_SUCCESS and is non fatal. (Currently Disabled)

SxSStackListenerCheck

Verifies that the SxS stack is up and running so connections can succeed. If this check fails is classified as fatal as no connection can succeed if the SxS stack is not ready. (Currently Enabled)

UrlsAccessibleCheck

Verifies that the required WVD service and Geneva URLs are reachable from the SessionHost. These URLs are: RdTokenUri, RdBrokerURI, RdDiagnosticsUri and storage blob URLs for agent monitoring (geneva). If this check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is unable to store warm path data (logs, operations ...). (Currently Disabled)

WebRTCRedirectorCheck

Verifies whether the WebRTCRedirector component is healthy. The WebRTCRedirector component is used to optimize video and audio performance in Microsoft Teams. This checks whether the component is still running, and whether there is a higher version available. If this check fails, it is non fatal and the machine still can service connections, main issue may be the WebRTCRedirector component has to be restarted or updated. (Currently Disabled)

HealthCheckResult

Represents the Health state of the health check we performed.

Value Description
HealthCheckFailed

Health check failed.

HealthCheckSucceeded

Health check passed.

SessionHostShutdown

We received a Shutdown notification.

Unknown

Health check result is not currently known.

SessionHost

Represents a SessionHost definition.

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.agentVersion

string

Version of agent on SessionHost.

properties.allowNewSession

boolean

Allow a new session.

properties.assignedUser

string

User assigned to SessionHost.

properties.friendlyName

string

Friendly name of SessionHost

properties.lastHeartBeat

string (date-time)

Last heart beat from SessionHost.

properties.lastUpdateTime

string (date-time)

The timestamp of the last update.

properties.objectId

string

ObjectId of SessionHost. (internal use)

properties.osVersion

string

The version of the OS on the session host.

properties.resourceId

string

Resource Id of SessionHost's underlying virtual machine.

properties.sessionHostHealthCheckResults

SessionHostHealthCheckReport[]

List of SessionHostHealthCheckReports

properties.sessions

integer (int32)

Number of sessions on SessionHost.

properties.status

Status

Status for a SessionHost.

properties.statusTimestamp

string (date-time)

The timestamp of the status.

properties.sxSStackVersion

string

The version of the side by side stack on the session host.

properties.updateErrorMessage

string

The error message.

properties.updateState

UpdateState

Update state of a SessionHost.

properties.virtualMachineId

string

Virtual Machine Id of SessionHost's underlying virtual machine.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

SessionHostHealthCheckFailureDetails

Contains details on the failure.

Name Type Description
errorCode

integer (int32)

Error code corresponding for the failure.

lastHealthCheckDateTime

string (date-time)

The timestamp of the last update.

message

string

Failure message: hints on what is wrong and how to recover.

SessionHostHealthCheckReport

The report for session host information.

Name Type Description
additionalFailureDetails

SessionHostHealthCheckFailureDetails

Additional detailed information on the failure.

healthCheckName

HealthCheckName

Represents the name of the health check operation performed.

healthCheckResult

HealthCheckResult

Represents the Health state of the health check we performed.

Status

Status for a SessionHost.

Value Description
Available

Session Host has passed all the health checks and is available to handle connections.

Disconnected

The Session Host is unavailable because it is currently disconnected.

DomainTrustRelationshipLost

SessionHost's domain trust relationship lost

FSLogixNotHealthy

FSLogix is in an unhealthy state on the session host.

NeedsAssistance

New status to inform admins that the health on their endpoint needs to be fixed. The connections might not fail, as these issues are not fatal.

NoHeartbeat

The Session Host is not heart beating.

NotJoinedToDomain

SessionHost is not joined to domain.

Shutdown

Session Host is shutdown - RD Agent reported session host to be stopped or deallocated.

SxSStackListenerNotReady

SxS stack installed on the SessionHost is not ready to receive connections.

Unavailable

Session Host is either turned off or has failed critical health checks which is causing service not to be able to route connections to this session host. Note this replaces previous 'NoHeartBeat' status.

UpgradeFailed

Session Host is unavailable because the critical component upgrade (agent, side-by-side stack, etc.) failed.

Upgrading

Session Host is unavailable because currently an upgrade of RDAgent/side-by-side stack is in progress. Note: this state will be removed once the upgrade completes and the host is able to accept connections.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UpdateState

Update state of a SessionHost.

Value Description
Failed
Initial
Pending
Started
Succeeded