GruppenverwaltungGroup Management
Sicherheitsgruppen, Microsoft-365-Gruppen, dynamische Regeln, Besitzermodelle und gruppenbasierte Lizenzierung.Security groups, Microsoft 365 groups, dynamic rules, ownership models, and group-based licensing.
Gruppen steuern Zugriff, Lizenzen, Kommunikation und Richtlinienzuweisungen.Groups control access, licenses, collaboration, and policy assignment.
Regelbasierte Gruppen reduzieren manuelle Pflege und Fehler.Rule-based groups reduce manual maintenance and mistakes.
Benennung, Ablauf und Besitzerschaft sind für saubere Betriebsmodelle zentral.Naming, expiration, and ownership are central to clean operating models.
GruppentypenGroup types
In Entra ID dominieren Sicherheitsgruppen und Microsoft-365-Gruppen. Beide Objekttypen sind technisch ähnlich, aber funktional unterschiedlich.In Entra ID, security groups and Microsoft 365 groups dominate. Both object types are technically similar but functionally different.
| AspektAspect | SicherheitsgruppeSecurity group | M365-GruppeM365 group |
|---|---|---|
| ZweckPurpose | Zugriff, Rollen, Lizenzierung.Access, roles, licensing. | Zusammenarbeit inkl. Teams/SharePoint/Planner.Collaboration including Teams/SharePoint/Planner. |
| mailEnabledmailEnabled | In der Regel nein.Usually no. | Ja.Yes. |
| groupTypesgroupTypes | Leer oder dyn. Sicherheitsregel.Empty or dynamic security rule. | ["Unified"] ggf. mit DynamicMembership.["Unified"] optionally with DynamicMembership. |
| Besitzer/MitgliederOwners/members | Ja.Yes. | Ja.Yes. |
| Nested groupsNested groups | Teilweise unterstützt.Partly supported. | Nicht für Mitgliedschaftsverschachtelung.Not for nested membership. |
| Gruppenbasierte LizenzierungGroup-based licensing | Ja.Yes. | Ja, wenn geeignet.Yes, if suitable. |
Connect-MgGraph -Scopes "Group.Read.All"
Get-MgGroup -Top 20 -Property DisplayName,SecurityEnabled,MailEnabled,GroupTypes |
Select-Object DisplayName, SecurityEnabled, MailEnabled, GroupTypes
GET https://graph.microsoft.com/v1.0/groups?$select=displayName,securityEnabled,mailEnabled,groupTypes&$top=20
Authorization: Bearer <token>
Sicherheitsgruppe erstellenCreate security group
Eine klassische Sicherheitsgruppe ist die Standardwahl für Zugriffssteuerung, App-Zuweisungen und rollennahe Automatisierung.A classic security group is the default choice for access control, app assignments, and role-adjacent automation.
Connect-MgGraph -Scopes "Group.ReadWrite.All"
New-MgGroup `
-DisplayName "SG-Cloud-Admins" `
-Description "Security group for cloud admins" `
-MailEnabled:$false `
-MailNickname "sg-cloud-admins" `
-SecurityEnabled:$true
POST https://graph.microsoft.com/v1.0/groups
Content-Type: application/json
Authorization: Bearer <token>
{
"displayName": "SG-Cloud-Admins",
"description": "Security group for cloud admins",
"mailEnabled": false,
"mailNickname": "sg-cloud-admins",
"securityEnabled": true
}
Microsoft-365-Gruppe erstellenCreate Microsoft 365 group
Microsoft-365-Gruppen bringen Collaboration-Workloads wie SharePoint, Exchange und optional Teams mit. Deshalb sollten Namenskonventionen und Besitzerschaft früh geklärt werden.Microsoft 365 groups bring collaboration workloads such as SharePoint, Exchange, and optionally Teams. Therefore, naming conventions and ownership should be defined early.
Connect-MgGraph -Scopes "Group.ReadWrite.All"
New-MgGroup `
-DisplayName "M365-Platform-Team" `
-Description "Collaboration workspace for platform team" `
-MailEnabled `
-MailNickname "m365-platform-team" `
-SecurityEnabled:$false `
-GroupTypes @("Unified")
POST https://graph.microsoft.com/v1.0/groups
Content-Type: application/json
Authorization: Bearer <token>
{
"displayName": "M365-Platform-Team",
"description": "Collaboration workspace for platform team",
"mailEnabled": true,
"mailNickname": "m365-platform-team",
"securityEnabled": false,
"groupTypes": ["Unified"]
}
Dynamische MitgliedschaftsregelnDynamic membership rules
Dynamische Gruppen basieren auf Benutzer- oder Geräteattributen. Sie eignen sich für Lizenzen, Conditional Access, App-Zuweisungen und Governance – solange die Quellattribute sauber gepflegt und vor Missbrauch geschützt sind.Dynamic groups are based on user or device attributes. They fit licensing, Conditional Access, app assignments, and governance—as long as source attributes are cleanly maintained and protected against misuse.
| OperatorOperator | DeutschGerman | EnglishEnglish | BeispielExample |
|---|---|---|---|
| -eq-eq | gleichgleich | equalsequals | user.department -eq "Sales"user.department -eq "Sales" |
| -ne-ne | ungleichungleich | not equalsnot equals | user.city -ne "Berlin"user.city -ne "Berlin" |
| -contains-contains | enthältenthält | containscontains | user.displayName -contains "Admin"user.displayName -contains "Admin" |
| -startsWith-startsWith | beginnt mitbeginnt mit | starts withstarts with | user.mail -startsWith "it-"user.mail -startsWith "it-" |
| -endsWith-endsWith | endet mitendet mit | ends withends with | user.userPrincipalName -endsWith "@contoso.com"user.userPrincipalName -endsWith "@contoso.com" |
| -match-match | Regex-TrefferRegex-Treffer | regex matchregex match | user.city -match "New.*"user.city -match "New.*" |
| -in-in | ist in Listeist in Liste | is in listis in list | user.country -in ["DE","AT","CH"]user.country -in ["DE","AT","CH"] |
| -notIn-notIn | ist nicht in Listeist nicht in Liste | is not in listis not in list | user.country -notIn ["US","CA"]user.country -notIn ["US","CA"] |
| -any-any | mindestens ein Wertmindestens ein Wert | any valueany value | (user.proxyAddresses -any (_ -contains "contoso.com"))(user.proxyAddresses -any (_ -contains "contoso.com")) |
| -all-all | alle Wertealle Werte | all valuesall values | (user.otherMails -all (_ -endsWith "@contoso.com"))(user.otherMails -all (_ -endsWith "@contoso.com")) |
| BenutzerattributUser property | EinsatzUsage |
|---|---|
| accountEnabledaccountEnabled | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| citycity | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| companyNamecompanyName | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| countrycountry | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| departmentdepartment | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| displayNamedisplayName | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| employeeIdemployeeId | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| employeeTypeemployeeType | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| givenNamegivenName | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| jobTitlejobTitle | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| mailmail | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| mailNicknamemailNickname | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| mobilemobile | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| officeLocationofficeLocation | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| onPremisesDistinguishedNameonPremisesDistinguishedName | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| passwordPoliciespasswordPolicies | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| physicalDeliveryOfficeNamephysicalDeliveryOfficeName | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| postalCodepostalCode | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| preferredLanguagepreferredLanguage | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| statestate | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| streetAddressstreetAddress | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| surnamesurname | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| telephoneNumbertelephoneNumber | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| usageLocationusageLocation | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| userPrincipalNameuserPrincipalName | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| userTypeuserType | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| otherMailsotherMails | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| proxyAddressesproxyAddresses | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| memberOfmemberOf | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| employeeHireDateemployeeHireDate | Für regelbasierte Benutzersegmente.For rule-based user segments. |
| GeräteattributDevice property | EinsatzUsage |
|---|---|
| device.deviceCategorydevice.deviceCategory | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.deviceIddevice.deviceId | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.deviceManufacturerdevice.deviceManufacturer | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.deviceModeldevice.deviceModel | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.deviceOSTypedevice.deviceOSType | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.deviceOSVersiondevice.deviceOSVersion | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.deviceOwnershipdevice.deviceOwnership | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.devicePhysicalIdsdevice.devicePhysicalIds | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.deviceTrustTypedevice.deviceTrustType | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.displayNamedevice.displayName | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.enrollmentProfileNamedevice.enrollmentProfileName | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.extensionAttribute1device.extensionAttribute1 | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.isCompliantdevice.isCompliant | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.isManageddevice.isManaged | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.managementTypedevice.managementType | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.profileTypedevice.profileType | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| device.systemLabelsdevice.systemLabels | Für regelbasierte Gerätesegmente.For rule-based device segments. |
| SzenarioScenario | RegelRule |
|---|---|
| Alle IT-MitarbeiterAll IT employees | user.department -eq "IT"user.department -eq "IT" |
| Deutschland oder ÖsterreichGermany or Austria | user.usageLocation -in ["DE","AT"]user.usageLocation -in ["DE","AT"] |
| Nicht deaktivierte GastkontenEnabled guest accounts | (user.userType -eq "Guest") and (user.accountEnabled -eq true)(user.userType -eq "Guest") and (user.accountEnabled -eq true) |
| Manager in BerlinManagers in Berlin | (user.jobTitle -contains "Manager") and (user.city -eq "Berlin")(user.jobTitle -contains "Manager") and (user.city -eq "Berlin") |
| Ausschluss von TestkontenExclude test accounts | (user.department -eq "IT") and not (user.displayName -startsWith "TEST-")(user.department -eq "IT") and not (user.displayName -startsWith "TEST-") |
| Mehrere FirmenmarkenMultiple company brands | user.companyName -in ["Contoso","Fabrikam"]user.companyName -in ["Contoso","Fabrikam"] |
| Compliant Windows-GeräteCompliant Windows devices | (device.deviceOSType -eq "Windows") and (device.isCompliant -eq true)(device.deviceOSType -eq "Windows") and (device.isCompliant -eq true) |
| Hybrid-Join-GeräteHybrid joined devices | device.deviceTrustType -eq "ServerAD"device.deviceTrustType -eq "ServerAD" |
Verwenden Sie keine frei durch Benutzer änderbaren Attribute für sicherheitskritische Gruppen, wenn diese Gruppen Zugriff oder Richtlinien steuern. Sonst kann Attribut-Manipulation indirekt zu Berechtigungseskalation führen.Do not use user-writable attributes for security-critical groups when those groups drive access or policies. Otherwise, attribute manipulation can indirectly cause privilege escalation.
Connect-MgGraph -Scopes "Group.ReadWrite.All"
New-MgGroup `
-DisplayName "DG-DE-Users" `
-Description "Dynamic group for users in Germany" `
-MailEnabled:$false `
-MailNickname "dg-de-users" `
-SecurityEnabled:$true `
-GroupTypes @("DynamicMembership") `
-MembershipRule 'user.usageLocation -eq "DE"' `
-MembershipRuleProcessingState "On"
POST https://graph.microsoft.com/v1.0/groups
Content-Type: application/json
Authorization: Bearer <token>
{
"displayName": "DG-DE-Users",
"description": "Dynamic group for users in Germany",
"mailEnabled": false,
"mailNickname": "dg-de-users",
"securityEnabled": true,
"groupTypes": ["DynamicMembership"],
"membershipRule": "user.usageLocation -eq \"DE\"",
"membershipRuleProcessingState": "On"
}
Mitglieder und BesitzerMembers and owners
Mitglieder und Besitzer sollten getrennt betrachtet werden. Besitzer administrieren das Objekt, Mitglieder erhalten Zugriff oder Collaboration-Funktionen.Members and owners should be treated separately. Owners administer the object, while members receive access or collaboration capabilities.
Connect-MgGraph -Scopes "Group.ReadWrite.All","User.Read.All"
New-MgGroupMemberByRef -GroupId "<group-id>" -BodyParameter @{
"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/<user-id>"
}
New-MgGroupOwnerByRef -GroupId "<group-id>" -BodyParameter @{
"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/<owner-id>"
}
Remove-MgGroupMemberByRef -GroupId "<group-id>" -DirectoryObjectId "<user-id>"
POST https://graph.microsoft.com/v1.0/groups/<group-id>/members/$ref
POST https://graph.microsoft.com/v1.0/groups/<group-id>/owners/$ref
DELETE https://graph.microsoft.com/v1.0/groups/<group-id>/members/<user-id>/$ref
Authorization: Bearer <token>
Verschachtelte GruppenNested groups
Verschachtelung ist für Sicherheitsgruppen in mehreren Szenarien möglich, aber nicht universell. Besonders bei Microsoft-365-Gruppen und app-spezifischen Assignments gelten Ausnahmen.Nesting is possible for security groups in several scenarios, but not universally. Exceptions especially apply to Microsoft 365 groups and app-specific assignments.
| SzenarioScenario | UnterstütztSupported | HinweisNote |
|---|---|---|
| Sicherheitsgruppe in SicherheitsgruppeSecurity group in security group | JaYes | Klassische Verschachtelung möglich.Classic nesting is possible. |
| M365-Gruppe als MitgliedM365 group as member | NeinNo | Nicht für Mitgliedschaftsverschachtelung gedacht.Not designed for nested membership. |
| App role assignmentsApp role assignments | EingeschränktLimited | Nicht alle Ziele berücksichtigen Nested Groups gleich.Not all targets evaluate nested groups equally. |
| Conditional AccessConditional Access | JaYes | Group scope unterstützt direkte und indirekte Mitgliedschaften.Group scope supports direct and indirect memberships. |
Connect-MgGraph -Scopes "Group.ReadWrite.All"
New-MgGroupMemberByRef -GroupId "<parent-group-id>" -BodyParameter @{
"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/<child-group-id>"
}
POST https://graph.microsoft.com/v1.0/groups/<parent-group-id>/members/$ref
Content-Type: application/json
Authorization: Bearer <token>
{
"@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/<child-group-id>"
}
Gruppenbasierte LizenzierungGroup-based licensing
Gruppenbasierte Lizenzierung reduziert Sonderfälle und unterstützt JML-Prozesse. Best Practice ist eine klare Trennung nach Persona, Region oder Workload.Group-based licensing reduces exceptions and supports joiner/mover/leaver processes. Best practice is clear separation by persona, region, or workload.
Connect-MgGraph -Scopes "Group.ReadWrite.All","Organization.Read.All"
$sku = Get-MgSubscribedSku | Where-Object SkuPartNumber -eq "ENTERPRISEPACK"
Set-MgGroupLicense -GroupId "<group-id>" -AddLicenses @{SkuId = $sku.SkuId} -RemoveLicenses @()
POST https://graph.microsoft.com/v1.0/groups/<group-id>/assignLicense
Content-Type: application/json
Authorization: Bearer <token>
{
"addLicenses": [{ "skuId": "6fd2c87f-b296-42f0-b197-1e91e994b900" }],
"removeLicenses": []
}
AblaufrichtlinieExpiration policy
Eine Ablaufrichtlinie hilft, verwaiste Microsoft-365-Gruppen zu reduzieren. Besitzer erhalten Verlängerungshinweise, bevor ein Objekt abläuft.An expiration policy helps reduce stale Microsoft 365 groups. Owners receive renewal notifications before an object expires.
Connect-MgGraph -Scopes "Group.Read.All"
Get-MgGroup -Filter "groupTypes/any(c:c eq 'Unified')" -ConsistencyLevel eventual
GET https://graph.microsoft.com/v1.0/groups?$filter=groupTypes/any(c:c eq 'Unified')
ConsistencyLevel: eventual
Authorization: Bearer <token>
BenennungsrichtlinieNaming policy
Benennungsrichtlinien strukturieren den Tenant und verhindern Wildwuchs. Präfixe, Suffixe und gesperrte Wörter sind typische Governance-Mittel.Naming policies structure the tenant and prevent sprawl. Prefixes, suffixes, and blocked words are common governance tools.
| ElementElement | EmpfehlungRecommendation |
|---|---|
| PräfixPrefix | z. B. SG-, DG-, M365-for example SG-, DG-, M365- |
| SuffixSuffix | z. B. Land, Workload oder Schutzklassefor example country, workload, or protection class |
| Blocked WordsBlocked words | Verhindern Sie Begriffe wie CEO, GlobalAdmin oder Secret.Prevent words like CEO, GlobalAdmin, or Secret. |
Connect-MgGraph -Scopes "Policy.Read.All"
Get-MgPolicyDirectorySetting
GET https://graph.microsoft.com/v1.0/policies/directorySettings
Authorization: Bearer <token>
Gruppen auflisten und filternList and filter groups
Für Inventare und Audits sollten Filter nach groupTypes, securityEnabled, mailEnabled oder Namensmustern genutzt werden. Dadurch bleiben Reports performant und reproduzierbar.For inventories and audits, use filters on groupTypes, securityEnabled, mailEnabled, or naming patterns. That keeps reports performant and reproducible.
Connect-MgGraph -Scopes "Group.Read.All"
Get-MgGroup -Filter "securityEnabled eq true" -ConsistencyLevel eventual -CountVariable count -All |
Select-Object DisplayName, MailEnabled, SecurityEnabled, GroupTypes
$count
GET https://graph.microsoft.com/v1.0/groups?$filter=securityEnabled eq true&$count=true
ConsistencyLevel: eventual
Authorization: Bearer <token>
Dynamic Group Rules – Complete ReferenceDynamic group rules – complete reference
Dynamische Gruppen sind nur so gut wie ihre Quellattribute. Für Level-500-Betrieb müssen HR-Felder, Device Tags, Extension Attributes und Änderungsrechte gemeinsam betrachtet werden – sonst wird eine Automatisierung zur Sicherheitslücke.Dynamic groups are only as good as their source attributes. In level-500 operations, HR fields, device tags, extension attributes, and write permissions must be evaluated together—otherwise automation becomes a security gap.
Operatoren und AusdrückeOperators and expressions
| OperatorOperator | EinsatzUse |
|---|---|
| -eq-eq | Gleichheit für Strings, Bool, Enum.Equality for strings, bools, enums. |
| -ne-ne | Ungleichheit.Inequality. |
| -startsWith-startsWith | Präfixsuche für Benennungsschemata.Prefix search for naming conventions. |
| -endsWith-endsWith | Suffix- oder Domänenvergleich.Suffix or domain matching. |
| -contains-contains | Teilzeichenfolge, sparsam einsetzen.Substring search, use sparingly. |
| -notContains-notContains | Ausschluss von Teilzeichenfolgen.Exclude substring matches. |
| -in-in | Vergleich gegen Werteliste.Match against a list of values. |
| -notIn-notIn | Ausschlussliste.Negative value list. |
| -any-any | Für Collections wie proxyAddresses oder devicePhysicalIds.For collections such as proxyAddresses or devicePhysicalIds. |
| -all-all | Seltener, wenn alle Werte ein Muster erfüllen müssen.Less common, when every value must satisfy a condition. |
Benutzerattribute für RegelnUser properties for rules
| EigenschaftProperty | BeispielsyntaxExample syntax | TypType |
|---|---|---|
| accountEnabledaccountEnabled | user.accountEnableduser.accountEnabled | BenutzerregelUser rule |
| assignedPlansassignedPlans | user.assignedPlansuser.assignedPlans | BenutzerregelUser rule |
| citycity | user.cityuser.city | BenutzerregelUser rule |
| companyNamecompanyName | user.companyNameuser.companyName | BenutzerregelUser rule |
| countrycountry | user.countryuser.country | BenutzerregelUser rule |
| departmentdepartment | user.departmentuser.department | BenutzerregelUser rule |
| deviceManagementAppIddeviceManagementAppId | user.deviceManagementAppIduser.deviceManagementAppId | BenutzerregelUser rule |
| deviceOSTypedeviceOSType | user.deviceOSTypeuser.deviceOSType | BenutzerregelUser rule |
| deviceOSVersiondeviceOSVersion | user.deviceOSVersionuser.deviceOSVersion | BenutzerregelUser rule |
| deviceOwnershipdeviceOwnership | user.deviceOwnershipuser.deviceOwnership | BenutzerregelUser rule |
| deviceTrustTypedeviceTrustType | user.deviceTrustTypeuser.deviceTrustType | BenutzerregelUser rule |
| displayNamedisplayName | user.displayNameuser.displayName | BenutzerregelUser rule |
| employeeIdemployeeId | user.employeeIduser.employeeId | BenutzerregelUser rule |
| employeeTypeemployeeType | user.employeeTypeuser.employeeType | BenutzerregelUser rule |
| extensionAttribute1extensionAttribute1 | user.extensionAttribute1user.extensionAttribute1 | BenutzerregelUser rule |
| extensionAttribute2extensionAttribute2 | user.extensionAttribute2user.extensionAttribute2 | BenutzerregelUser rule |
| extensionAttribute3extensionAttribute3 | user.extensionAttribute3user.extensionAttribute3 | BenutzerregelUser rule |
| extensionAttribute4extensionAttribute4 | user.extensionAttribute4user.extensionAttribute4 | BenutzerregelUser rule |
| extensionAttribute5extensionAttribute5 | user.extensionAttribute5user.extensionAttribute5 | BenutzerregelUser rule |
| extensionAttribute6extensionAttribute6 | user.extensionAttribute6user.extensionAttribute6 | BenutzerregelUser rule |
| extensionAttribute7extensionAttribute7 | user.extensionAttribute7user.extensionAttribute7 | BenutzerregelUser rule |
| extensionAttribute8extensionAttribute8 | user.extensionAttribute8user.extensionAttribute8 | BenutzerregelUser rule |
| extensionAttribute9extensionAttribute9 | user.extensionAttribute9user.extensionAttribute9 | BenutzerregelUser rule |
| extensionAttribute10extensionAttribute10 | user.extensionAttribute10user.extensionAttribute10 | BenutzerregelUser rule |
| extensionAttribute11extensionAttribute11 | user.extensionAttribute11user.extensionAttribute11 | BenutzerregelUser rule |
| extensionAttribute12extensionAttribute12 | user.extensionAttribute12user.extensionAttribute12 | BenutzerregelUser rule |
| extensionAttribute13extensionAttribute13 | user.extensionAttribute13user.extensionAttribute13 | BenutzerregelUser rule |
| extensionAttribute14extensionAttribute14 | user.extensionAttribute14user.extensionAttribute14 | BenutzerregelUser rule |
| extensionAttribute15extensionAttribute15 | user.extensionAttribute15user.extensionAttribute15 | BenutzerregelUser rule |
| facsimileTelephoneNumberfacsimileTelephoneNumber | user.facsimileTelephoneNumberuser.facsimileTelephoneNumber | BenutzerregelUser rule |
| givenNamegivenName | user.givenNameuser.givenName | BenutzerregelUser rule |
| jobTitlejobTitle | user.jobTitleuser.jobTitle | BenutzerregelUser rule |
| legalAgeGroupClassificationlegalAgeGroupClassification | user.legalAgeGroupClassificationuser.legalAgeGroupClassification | BenutzerregelUser rule |
| mailmail | user.mailuser.mail | BenutzerregelUser rule |
| mailNicknamemailNickname | user.mailNicknameuser.mailNickname | BenutzerregelUser rule |
| memberOfmemberOf | user.memberOfuser.memberOf | BenutzerregelUser rule |
| mobilemobile | user.mobileuser.mobile | BenutzerregelUser rule |
| mobilePhonemobilePhone | user.mobilePhoneuser.mobilePhone | BenutzerregelUser rule |
| objectIdobjectId | user.objectIduser.objectId | BenutzerregelUser rule |
| onPremisesDistinguishedNameonPremisesDistinguishedName | user.onPremisesDistinguishedNameuser.onPremisesDistinguishedName | BenutzerregelUser rule |
| onPremisesSecurityIdentifieronPremisesSecurityIdentifier | user.onPremisesSecurityIdentifieruser.onPremisesSecurityIdentifier | BenutzerregelUser rule |
| onPremisesSyncEnabledonPremisesSyncEnabled | user.onPremisesSyncEnableduser.onPremisesSyncEnabled | BenutzerregelUser rule |
| otherMailsotherMails | user.otherMailsuser.otherMails | BenutzerregelUser rule |
| passwordPoliciespasswordPolicies | user.passwordPoliciesuser.passwordPolicies | BenutzerregelUser rule |
| physicalDeliveryOfficeNamephysicalDeliveryOfficeName | user.physicalDeliveryOfficeNameuser.physicalDeliveryOfficeName | BenutzerregelUser rule |
| postalCodepostalCode | user.postalCodeuser.postalCode | BenutzerregelUser rule |
| preferredLanguagepreferredLanguage | user.preferredLanguageuser.preferredLanguage | BenutzerregelUser rule |
| proxyAddressesproxyAddresses | user.proxyAddressesuser.proxyAddresses | BenutzerregelUser rule |
| sipProxyAddresssipProxyAddress | user.sipProxyAddressuser.sipProxyAddress | BenutzerregelUser rule |
| statestate | user.stateuser.state | BenutzerregelUser rule |
| streetAddressstreetAddress | user.streetAddressuser.streetAddress | BenutzerregelUser rule |
| surnamesurname | user.surnameuser.surname | BenutzerregelUser rule |
| telephoneNumbertelephoneNumber | user.telephoneNumberuser.telephoneNumber | BenutzerregelUser rule |
| usageLocationusageLocation | user.usageLocationuser.usageLocation | BenutzerregelUser rule |
| userPrincipalNameuserPrincipalName | user.userPrincipalNameuser.userPrincipalName | BenutzerregelUser rule |
| userTypeuserType | user.userTypeuser.userType | BenutzerregelUser rule |
| employeeHireDateemployeeHireDate | user.employeeHireDateuser.employeeHireDate | BenutzerregelUser rule |
Geräteattribute für RegelnDevice properties for rules
| EigenschaftProperty | BeispielsyntaxExample syntax | HinweisNote |
|---|---|---|
| accountEnabledaccountEnabled | device.accountEnabled -eq truedevice.accountEnabled -eq true | Aktiver Gerätebestand.Active device inventory. |
| deviceCategorydeviceCategory | device.deviceCategory -eq "BYOD"device.deviceCategory -eq "BYOD" | Intune-Kategorie.Intune category. |
| deviceIddeviceId | device.deviceId -eq "<guid>"device.deviceId -eq "<guid>" | Konkretes Gerät.Specific device. |
| deviceManagementAppIddeviceManagementAppId | device.deviceManagementAppId -eq "0000000a-0000-0000-c000-000000000000"device.deviceManagementAppId -eq "0000000a-0000-0000-c000-000000000000" | Intune-managed Geräte.Intune-managed devices. |
| deviceManufacturerdeviceManufacturer | device.deviceManufacturer -eq "Surface"device.deviceManufacturer -eq "Surface" | Herstellerfilter.Manufacturer filter. |
| deviceModeldeviceModel | device.deviceModel -eq "iPad Air"device.deviceModel -eq "iPad Air" | Modellfilter.Model filter. |
| displayNamedisplayName | device.displayName -startsWith "LAP-"device.displayName -startsWith "LAP-" | Namensschema.Naming convention. |
| deviceOSTypedeviceOSType | device.deviceOSType -eq "Windows"device.deviceOSType -eq "Windows" | Betriebssystem.Operating system. |
| deviceOSVersiondeviceOSVersion | device.deviceOSVersion -startsWith "10.0.22631"device.deviceOSVersion -startsWith "10.0.22631" | Release-Ring oder Compliance.Release ring or compliance. |
| deviceOwnershipdeviceOwnership | device.deviceOwnership -eq "Company"device.deviceOwnership -eq "Company" | Corporate vs. Personal.Corporate versus personal. |
| devicePhysicalIdsdevicePhysicalIds | device.devicePhysicalIds -any (_ -startsWith "[ZTDId]")device.devicePhysicalIds -any (_ -startsWith "[ZTDId]") | Autopilot und Beschaffung.Autopilot and procurement. |
| deviceTrustTypedeviceTrustType | device.deviceTrustType -eq "AzureAD"device.deviceTrustType -eq "AzureAD" | Joined, hybrid joined, registered.Joined, hybrid joined, registered. |
| enrollmentProfileNameenrollmentProfileName | device.enrollmentProfileName -eq "Autopilot-Standard"device.enrollmentProfileName -eq "Autopilot-Standard" | Enrollment profile targeting.Enrollment profile targeting. |
| extensionAttribute1-15extensionAttribute1-15 | device.extensionAttribute1 -eq "Finance"device.extensionAttribute1 -eq "Finance" | Gerätemetadaten aus CMDB/MDM.Device metadata from CMDB/MDM. |
| isRootedisRooted | device.isRooted -eq truedevice.isRooted -eq true | Sicherheits-/Compliance-Fokus.Security/compliance focus. |
| managementTypemanagementType | device.managementType -eq "MDM"device.managementType -eq "MDM" | MDM/MAM-Differenzierung.MDM/MAM differentiation. |
| memberOfmemberOf | device.memberOf -any (group.objectId -in ['<groupId>'])device.memberOf -any (group.objectId -in ['<groupId>']) | Abgeleitete Gerätesegmente.Derived device segments. |
| objectIdobjectId | device.objectId -eq "<guid>"device.objectId -eq "<guid>" | Direkte Selektion.Direct selection. |
| profileTypeprofileType | device.profileType -eq "RegisteredDevice"device.profileType -eq "RegisteredDevice" | Geräteregistrierungsart.Device registration profile type. |
| systemLabelssystemLabels | device.systemLabels -startsWith "M365Managed"device.systemLabels -startsWith "M365Managed" | Read-only Tags aus Microsoft-Services.Read-only labels originating from Microsoft services. |
Validierung und typische FehlerValidation and common errors
| FehlerklasseError class | Problematisches MusterProblematic pattern | KorrekturCorrection |
|---|---|---|
| Nicht unterstütztes AttributUnsupported attribute | user.invalidProperty -eq "x"user.invalidProperty -eq "x" | Nur dokumentierte Eigenschaften verwenden; Schreibrechte vor Einsatz prüfen.Use only documented properties and validate write permissions before adopting them. |
| Falscher OperatorWrong operator | user.accountEnabled -contains trueuser.accountEnabled -contains true | Booleans mit -eq/-ne, collections mit -any/-all.Use -eq/-ne for booleans and -any/-all for collections. |
| Fehlender logischer OperatorMissing logical operator | (user.department -eq "IT") (user.city -eq "Berlin")(user.department -eq "IT") (user.city -eq "Berlin") | Ausdrücke mit -and/-or verbinden.Join expressions with -and/-or. |
| Case und NullhandlingCase and null handling | user.userType -eq "guest"user.userType -eq "guest" | Werte exakt nach Dokumentation und null explizit behandeln.Use documented values and handle null explicitly. |
| Unsaubere Autopilot-RegelnPoor Autopilot rules | device.devicePhysicalIds -contains "OrderID"device.devicePhysicalIds -contains "OrderID" | Mit -any und exaktem Präfix [OrderID]: arbeiten.Use -any and the exact [OrderID]: prefix. |
PraxisbeispieleReal-world examples
| SzenarioScenario | RegelRule |
|---|---|
| Alle internen IT-BenutzerAlle internen IT-Benutzer | (user.department -eq "IT") and (user.userType -eq "Member")(user.department -eq "IT") and (user.userType -eq "Member") |
| Alle GästeAlle Gäste | (user.userType -eq "Guest")(user.userType -eq "Guest") |
| Vertrieb in DeutschlandVertrieb in Deutschland | (user.department -eq "Sales") and (user.country -eq "DE")(user.department -eq "Sales") and (user.country -eq "DE") |
| Mitarbeiter mit Kostenstellen-ExtensionMitarbeiter mit Kostenstellen-Extension | (user.extensionAttribute3 -eq "CC-1000")(user.extensionAttribute3 -eq "CC-1000") |
| Synced BenutzerSynced Benutzer | (user.onPremisesSyncEnabled -eq true)(user.onPremisesSyncEnabled -eq true) |
| Cloud-only BenutzerCloud-only Benutzer | (user.onPremisesSyncEnabled -ne true)(user.onPremisesSyncEnabled -ne true) |
| Manager mit TitelManager mit Titel | (user.jobTitle -contains "Manager")(user.jobTitle -contains "Manager") |
| ContractorContractor | (user.employeeType -eq "Contractor")(user.employeeType -eq "Contractor") |
| Benutzer mit FirmenmailBenutzer mit Firmenmail | (user.mail -endsWith "@contoso.com")(user.mail -endsWith "@contoso.com") |
| Alle mit MobileAlle mit Mobile | (user.mobile -ne null)(user.mobile -ne null) |
| Passwort nie ablaufendPasswort nie ablaufend | (user.passwordPolicies -eq "DisablePasswordExpiration")(user.passwordPolicies -eq "DisablePasswordExpiration") |
| Mitglied einer BasisgruppeMitglied einer Basisgruppe | (user.memberOf -any (group.objectId -in ["11111111-1111-1111-1111-111111111111"]))(user.memberOf -any (group.objectId -in ["11111111-1111-1111-1111-111111111111"])) |
| Berlin oder MünchenBerlin oder München | (user.city -in ["Berlin","Muenchen"])(user.city -in ["Berlin","Muenchen"]) |
| US Usage LocationUS Usage Location | (user.usageLocation -eq "US")(user.usageLocation -eq "US") |
| Fakultät/LehreFakultät/Lehre | (user.extensionAttribute10 -eq "Faculty")(user.extensionAttribute10 -eq "Faculty") |
| FIDO-PilotFIDO-Pilot | (user.extensionAttribute12 -eq "PasskeyPilot")(user.extensionAttribute12 -eq "PasskeyPilot") |
| Workday-Hire-Date in ZukunftWorkday-Hire-Date in Zukunft | (user.employeeHireDate -ge system.now)(user.employeeHireDate -ge system.now) |
| Autopilot WindowsAutopilot Windows | (device.devicePhysicalIds -any (_ -startsWith "[ZTDId]")) and (device.deviceOSType -eq "Windows")(device.devicePhysicalIds -any (_ -startsWith "[ZTDId]")) and (device.deviceOSType -eq "Windows") |
| Corporate AndroidCorporate Android | (device.deviceOSType -startsWith "Android") and (device.deviceOwnership -eq "Company")(device.deviceOSType -startsWith "Android") and (device.deviceOwnership -eq "Company") |
| Hybrid JoinHybrid Join | (device.deviceTrustType -eq "ServerAD")(device.deviceTrustType -eq "ServerAD") |
| Shared iPadsShared iPads | (device.deviceModel -contains "iPad") and (device.deviceCategory -eq "Shared")(device.deviceModel -contains "iPad") and (device.deviceCategory -eq "Shared") |
| M365 ManagedM365 Managed | (device.systemLabels -startsWith "M365Managed")(device.systemLabels -startsWith "M365Managed") |
Verwenden Sie niemals ein Attribut in einer dynamischen Gruppe, das ein normaler Benutzer selbst ändern darf, wenn die Gruppe Lizenzen, Rollen, CA-Ausnahmen oder privilegierte App-Zugriffe steuert.Never use an attribute in a dynamic group if regular users can edit that attribute and the group controls licenses, roles, CA exceptions, or privileged app access.
Group WritebackGroup writeback
Group Writeback verbindet Cloud-Gruppen mit lokalem Active Directory. Für Hybridorganisationen ist das vor allem relevant, wenn lokale Anwendungen weiterhin AD-Gruppen lesen, während die Quelle der Wahrheit bereits in Entra ID liegt.Group writeback links cloud groups with on-premises Active Directory. In hybrid organizations, this matters when on-premises applications still consume AD groups while Entra ID is already the source of truth.
| SzenarioScenario | BeschreibungDescription |
|---|---|
| Microsoft 365 Group WritebackMicrosoft 365 group writeback | Schreibt Unified Groups in das lokale AD für Exchange-/Applikationskompatibilität zurück.Writes unified groups back to on-prem AD for Exchange or application compatibility. |
| Cloud Security Group WritebackCloud security group writeback | Ermöglicht lokalen Workloads die Nutzung cloudverwalteter Sicherheitsgruppen.Enables on-prem workloads to consume cloud-managed security groups. |
| VoraussetzungenPrerequisites | Entra Connect/Cloud Sync Design, OU-Konzept, Attributmapping, Konfliktmanagement.Entra Connect/Cloud Sync design, OU concept, attribute mapping, and conflict handling. |
- Schreibziel-OU definieren und Berechtigungen des Sync-Dienstkontos prüfen.Define the target OU and validate permissions of the sync service account.
- Objektnamensschema, Mailattribute und Kollisionen mit bestehenden AD-Gruppen bereinigen.Normalize naming, mail attributes, and collisions with existing AD groups.
- Writeback aktivieren, Pilotgruppe definieren und Delta/Full Sync dokumentiert testen.Enable writeback, define a pilot set, and test documented delta/full synchronization.
- Downstream-Apps auf Member- und SID-Auflösung prüfen.Validate downstream applications for member and SID resolution.
Connect-MgGraph -Scopes "Group.Read.All"
Get-MgGroup -Filter "groupTypes/any(c:c eq 'Unified')" -All |
Select-Object DisplayName, MailNickname, Id
Definieren Sie vor dem Pilot, welche Quelle für Mitglieder, Beschreibung, Mailnickname und Besitzerschaft führend bleibt. Ohne diese Entscheidung erzeugt Writeback schnell Dauerkonflikte zwischen Cloud und lokalem AD.Before piloting, define which source stays authoritative for membership, description, mail nickname, and ownership. Without that decision, writeback quickly creates permanent conflicts between cloud and on-prem AD.
Microsoft 365 Group SettingsMicrosoft 365 group settings
Die Group.Unified-Vorlage steuert Gastzugriff, Benennungsregeln, Klassifizierung und Self-Service. In großen Tenants sollten diese Werte wie eine Richtlinie behandelt und versioniert werden.The Group.Unified template controls guest access, naming, classification, and self-service. In large tenants, treat these values like policy and version them.
| SettingSetting | BedeutungMeaning |
|---|---|
| AllowGuestsToAccessGroupsAllowGuestsToAccessGroups | Steuert Gastzugriff auf M365-Gruppeninhalte.Controls guest access to Microsoft 365 group content. |
| AllowToAddGuestsAllowToAddGuests | Erlaubt Besitzern das Hinzufügen externer Gäste.Allows owners to add external guests. |
| UsageGuidelinesUrlUsageGuidelinesUrl | Link auf Governance-/Kollaborationsrichtlinien.Points to collaboration governance guidelines. |
| ClassificationListClassificationList | Verfügbare Klassifizierungslabels wie Public, Internal, Confidential.Available classification labels such as Public, Internal, Confidential. |
| DefaultClassificationDefaultClassification | Standardklassifizierung für neue Gruppen.Default classification for new groups. |
| PrefixSuffixNamingRequirementPrefixSuffixNamingRequirement | Benennungsvorgabe mit Attribut-Platzhaltern.Naming requirement with attribute placeholders. |
| CustomBlockedWordsListCustomBlockedWordsList | Liste gesperrter Begriffe.Blocked words list. |
| EnableGroupCreationEnableGroupCreation | Globale Freigabe für Gruppenerstellung.Global toggle for group creation. |
| GroupCreationAllowedGroupIdGroupCreationAllowedGroupId | Scope-Gruppe, falls Gruppenerstellung eingeschränkt ist.Scope group when group creation is restricted. |
| EnableMIPLabelsEnableMIPLabels | Integration mit Sensitivity Labels.Sensitivity label integration. |
BetriebspraktikenOperational practices
| PraxisPractice | Warum relevantWhy it matters |
|---|---|
| Klassifizierung standardisierenStandardize classification | Verknüpft Gruppen-Governance mit Purview, Sharing und Sensitivity Labels.Links group governance to Purview, sharing, and sensitivity labels. |
| UsageGuidelinesUrl pflegenMaintain UsageGuidelinesUrl | Hilft Besitzern, Self-Service verantwortungsvoll zu nutzen.Helps owners use self-service responsibly. |
| Blocked words kuratierenCurate blocked words | Verhindert riskante oder peinliche Gruppennamen.Prevents risky or embarrassing group names. |
| Group creation scopenScope group creation | Erlaubt kontrollierte Self-Service-Modelle.Enables controlled self-service models. |
| Template-Änderungen versionierenVersion template changes | Änderungen an Gastzugriff oder Naming wirken tenantweit.Changes to guest access or naming affect the entire tenant. |
Connect-MgGraph -Scopes "Directory.ReadWrite.All","Policy.ReadWrite.Authorization"
$settings = Get-MgBetaDirectorySetting | Where-Object DisplayName -eq "Group.Unified"
if (-not $settings) {
$template = Get-MgBetaDirectorySettingTemplate | Where-Object DisplayName -eq "Group.Unified"
$settings = New-MgBetaDirectorySetting -TemplateId $template.Id
}
$values = @(
@{ Name = "AllowGuestsToAccessGroups"; Value = "true" },
@{ Name = "AllowToAddGuests"; Value = "false" },
@{ Name = "UsageGuidelinesUrl"; Value = "https://intra.contoso.com/m365-groups" },
@{ Name = "ClassificationList"; Value = "Public,Internal,Confidential,HighlyConfidential" },
@{ Name = "DefaultClassification"; Value = "Internal" },
@{ Name = "PrefixSuffixNamingRequirement"; Value = "[Department]-[GroupName]" },
@{ Name = "CustomBlockedWordsList"; Value = "CEO,Admin,Global,Secret,Payroll" }
)
Update-MgBetaDirectorySetting -DirectorySettingId $settings.Id -Values $values