{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/power-bi/json-schema/power-bi-pipeline-user-schema.json",
  "title": "PipelineUser",
  "description": "A Power BI user access right entry for a deployment pipeline",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/power-bi-pipelines-api-openapi.yml#/components/schemas/PipelineUser",
  "required": [
    "identifier",
    "principalType"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/Principal"
    }
  ],
  "properties": {
    "accessRight": {
      "type": "string",
      "description": "Required. The access right a user has for the deployment pipeline.",
      "enum": [
        "Admin"
      ],
      "x-ms-enum": {
        "name": "PipelineUserAccessRight",
        "modelAsExtensible": true,
        "values": [
          {
            "value": "Admin",
            "description": "Grants administrator rights to a deployment pipeline"
          }
        ]
      }
    }
  },
  "$defs": {
    "Principal": {
      "required": [
        "identifier",
        "principalType"
      ],
      "description": "A Power BI principal with access to the artifact",
      "properties": {
        "identifier": {
          "type": "string",
          "description": "For principal type `User`, provide the *UPN*. Otherwise provide the [object ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) of the principal."
        },
        "principalType": {
          "$ref": "#/$defs/PrincipalType"
        }
      }
    },
    "PrincipalType": {
      "type": "string",
      "description": "The principal type",
      "enum": [
        "None",
        "User",
        "Group",
        "App"
      ],
      "x-ms-enum": {
        "name": "PrincipalType",
        "modelAsExtensible": true,
        "values": [
          {
            "value": "None",
            "description": "No principal type. Use for whole organization level access."
          },
          {
            "value": "User",
            "description": "User principal type"
          },
          {
            "value": "Group",
            "description": "Group principal type"
          },
          {
            "value": "App",
            "description": "Service principal type"
          }
        ]
      }
    }
  }
}