Last active
May 21, 2025 18:47
-
-
Save jpbruckler/64c942b5d4875d1d41a17bb8639ada32 to your computer and use it in GitHub Desktop.
JSON schema for basic entra groups script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$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