---
title: "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/createLab"
method: POST
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/createLab"
tags: ["LabAccounts"]
---

# POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/createLab

`POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/createLab`

Create a lab in a lab account.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `labAccountName` string, required

## Query parameters

- `api-version` string, required

## Request body

- CreateLabProperties — Properties for creating a managed lab and a default environment setting
  - `environmentSettingCreationParameters` EnvironmentSettingCreationParameters — Settings related to creating an environment setting
    - `resourceSettingCreationParameters` ResourceSettingCreationParameters, required — Represents resource specific settings
      - `location` string — The location where the virtual machine will live
      - `name` string — The name of the resource setting
      - `galleryImageResourceId` string, required — The resource id of the gallery image used for creating the virtual machine
      - `size` 'Basic' | 'Standard' | 'Performance' — The size of the virtual machine
      - `referenceVmCreationParameters` ReferenceVmCreationParameters, required — Creation parameters for Reference Vm
        - `userName` string, required — The username of the virtual machine
        - `password` string, required — The password of the virtual machine.
  - `labCreationParameters` LabCreationParameters, required — Settings related to creating a lab
    - `maxUsersInLab` integer — Maximum number of users allowed in the lab.
  - `name` string, required — The name of the resource
  - `location` string — The location of the resource
  - `tags` object — The tags of the resource.

## Response `200`

OK

## Other responses

- `default` — BadRequest

---

[API](https://skmtc.dev/azure/apis/managedlabsclient.md) · [All operations](https://skmtc.dev/azure/apis/managedlabsclient/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/managedlabsclient/revisions/c5b9e6b8da98/schema)
