{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-test-labs/json-schema/azure-test-labs-user-fragment-schema.json",
  "title": "UserFragment",
  "description": "Profile of a lab user.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-test-labs-users-api-openapi.yml#/components/schemas/UserFragment",
  "allOf": [
    {
      "$ref": "#/$defs/UpdateResource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/UserPropertiesFragment",
      "description": "The properties of the resource.",
      "x-ms-client-flatten": true
    }
  },
  "type": "object",
  "$defs": {
    "UpdateResource": {
      "description": "Represents an update resource",
      "properties": {
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags of the resource.",
          "type": "object"
        }
      },
      "type": "object"
    },
    "UserIdentityFragment": {
      "description": "Identity attributes of a lab user.",
      "properties": {
        "appId": {
          "description": "Set to the app Id of the client JWT making the request.",
          "type": "string"
        },
        "objectId": {
          "description": "Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.",
          "type": "string"
        },
        "principalId": {
          "description": "Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.",
          "type": "string"
        },
        "principalName": {
          "description": "Set to the principal name / UPN of the client JWT making the request.",
          "type": "string"
        },
        "tenantId": {
          "description": "Set to the tenant ID of the client JWT making the request.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "UserPropertiesFragment": {
      "description": "Properties of a lab user profile.",
      "properties": {
        "identity": {
          "$ref": "#/$defs/UserIdentityFragment",
          "description": "The identity of the user."
        },
        "secretStore": {
          "$ref": "#/$defs/UserSecretStoreFragment",
          "description": "The secret store of the user."
        }
      },
      "type": "object"
    },
    "UserSecretStoreFragment": {
      "description": "Properties of a user's secret store.",
      "properties": {
        "keyVaultId": {
          "description": "The ID of the user's Key vault.",
          "type": "string"
        },
        "keyVaultUri": {
          "description": "The URI of the user's Key vault.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}