Skip to content

Instantly share code, notes, and snippets.

@jpbruckler
Last active May 21, 2025 18:47
Show Gist options
  • Select an option

  • Save jpbruckler/64c942b5d4875d1d41a17bb8639ada32 to your computer and use it in GitHub Desktop.

Select an option

Save jpbruckler/64c942b5d4875d1d41a17bb8639ada32 to your computer and use it in GitHub Desktop.
JSON schema for basic entra groups script
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Entra Group Definitions",
"type": "object",
"properties": {
"tenants": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "groups"],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Tenant GUID"
},
"name": {
"type": "string",
"maxLength": 100,
"description": "Human-readable name for the tenant"
},
"groups": {
"type": "array",
"items": {
"type": "object",
"required": [
"DisplayName",
"MailEnabled",
"SecurityEnabled"
],
"properties": {
"DisplayName": {
"type": "string",
"maxLength": 256,
"description": "The display name for the group."
},
"MailEnabled": {
"type": "boolean",
"description": "Whether the group is mail-enabled."
},
"MailNickname": {
"type": "string",
"maxLength": 64,
"pattern": "^[^@\\(\\)/\\[\\]'\\;\\:\\<\\>, ]+$",
"description": "Mail alias for the group; must be unique, ASCII, and not contain certain special characters."
},
"SecurityEnabled": {
"type": "boolean",
"description": "Whether the group is a security group."
},
"Description": {
"type": "string",
"description": "Description for the group."
}
},
"additionalProperties": true,
"allOf": [
{
"if": {
"properties": {
"MailEnabled": { "const": true }
}
},
"then": {
"required": ["MailNickname"]
}
}
]
}
}
},
"additionalProperties": false
}
}
},
"required": ["tenants"],
"additionalProperties": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment