{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/active-directory/json-schema/active-directory-app-role-assignment-schema.json",
  "title": "AppRoleAssignment",
  "description": "An app role assignment granting a user, group, or SP access to an app role",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/active-directory-app-role-assignments-api-openapi.yml#/components/schemas/AppRoleAssignment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "appRoleId": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the app role being assigned"
    },
    "principalId": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the user, group, or service principal receiving the role"
    },
    "principalDisplayName": {
      "type": "string"
    },
    "principalType": {
      "type": "string",
      "enum": [
        "User",
        "Group",
        "ServicePrincipal"
      ]
    },
    "resourceId": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the resource service principal (the API)"
    },
    "resourceDisplayName": {
      "type": "string"
    },
    "createdDateTime": {
      "type": "string",
      "format": "date-time"
    }
  }
}