---
title: "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/reconnect"
method: POST
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/reconnect"
tags: ["machines"]
---

# POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/reconnect

`POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/reconnect`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/reconnect`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

The operation to reconnect a hybrid machine resource to its identity in Azure.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `name` string, required

## Query parameters

- `api-version` string, required

## Request body

- MachineReconnect: Describes a hybrid machine reconnect.
  - `properties` MachineReconnectProperties: Hybrid Compute Machine properties
    - `vmId` string: Specifies the hybrid machine unique ID.
    - `clientPublicKey` string: Public Key that the client provides to be used during initial resource onboarding.

## Response `200`

OK

- Machine: Describes a hybrid machine.
  - `id` string: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  - `name` string: The name of the resource
  - `type` string: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
  - `tags` object: Resource tags.
  - `location` string, required: The geo-location where the resource lives
  - `properties` MachineProperties: Hybrid Compute Machine properties
    - `locationData` LocationData: Metadata pertaining to the geographic location of the resource.
      - `name` string, required: A canonical name for the geographic or physical location.
      - `city` string: The city or locality where the resource is located.
      - `district` string: The district, state, or province where the resource is located.
      - `countryOrRegion` string: The country or region where the resource is located
    - `osProfile` OSProfile: Specifies the operating system settings for the hybrid machine.
      - `computerName` string: Specifies the host OS name of the hybrid machine.
    - `provisioningState` string: The provisioning state, which only appears in the response.
    - `status` 'Connected' | 'Disconnected' | 'Error': The status of the hybrid machine agent.
    - `lastStatusChange` string, date-time: The time of the last status change.
    - `errorDetails` ErrorDetail[]: Details about the error state.
      - `code` string, required: The error's code.
      - `message` string, required: A human readable error message.
      - `target` string: Indicates which property in the request is responsible for the error.
      - `details` ErrorDetail[]: Additional error details.
    - `agentVersion` string: The hybrid machine agent full version.
    - `vmId` string: Specifies the hybrid machine unique ID.
    - `displayName` string: Specifies the hybrid machine display name.
    - `machineFqdn` string: Specifies the hybrid machine FQDN.
    - `clientPublicKey` string: Public Key that the client provides to be used during initial resource onboarding
    - `osName` string: The Operating System running on the hybrid machine.
    - `osVersion` string: The version of Operating System running on the hybrid machine.
    - `extensions` MachineExtensionInstanceView[]: Machine Extensions information
      - `name` string: The machine extension name.
      - `type` string: Specifies the type of the extension; an example is "CustomScriptExtension".
      - `typeHandlerVersion` string: Specifies the version of the script handler.
      - `status` object: Instance view status.
        - `code` string: The status code.
        - `level` 'Info' | 'Warning' | 'Error': The level code.
        - `displayStatus` string: The short localizable label for the status.
        - `message` string: The detailed status message, including for alerts and error messages.
        - `time` string, date-time: The time of the status.
  - `identity` Identity: Identity for the resource.
    - `principalId` string: The principal ID of resource identity.
    - `tenantId` string: The tenant ID of resource.
    - `type` 'SystemAssigned': The identity type.

## Other responses

- `default`: Error response describing why the operation failed.

---

[API](https://skmtc.dev/azure/apis/hybridcomputemanagementclient.md) - [All operations](https://skmtc.dev/azure/apis/hybridcomputemanagementclient/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/hybridcomputemanagementclient/revisions/5dfc82afccd8?raw)
