Entra ID on Windows
Use Microsoft Entra ID users and groups with DefenseClaw on Entra-joined Windows: join the computer, map a group to the sign-in token and fix problems.
On an Entra-joined computer, DefenseClaw reads the user's SID, UPN and tenant from the identity store and the join state, and the groups from the sign-in token. An Entra group reaches the token only when a built-in local group lists it, so that is the one extra step. Entra ID support is Preview.
Before you start
- The groups, users and group SIDs from Prepare the tenant.
- The scripts
Get-DefenseClawEntraIdentity.ps1andAdd-EntraGroupToLocalGroup.ps1from the starter kit. - For group-based profiles: the standalone enterprise profile. A per-user install has no group list on Windows.
Set it up
Join and sign in
Join the computer in Settings > Accounts > Access work or school > Join this device to Microsoft Entra ID.
- The user who joins is a local administrator by default. Remove that account from Administrators if your users should be standard users.
- On an Azure VM, the
AADLoginForWindowsextension joins it, and each user needs the Virtual Machine User Login role. - Windows gives the account a name of its own, not the UPN (
AzureAD\EntraAliceforentra-alice@...), and a SID that starts withS-1-12-1-.
See what the computer exposes
Run the read-only diagnostic as the user you want to check, and again as SYSTEM to read the identity store:
.\Get-DefenseClawEntraIdentity.ps1
.\Get-DefenseClawEntraIdentity.ps1 -GroupSid S-1-12-1-1864145422-1280850733-3047453086-4192786374It prints the dsregcmd /status join state, the Entra accounts in the identity store (SID, UPN, provider), the tenant, the token's groups with Entra SIDs marked, the built-in local groups that list an Entra SID and, when DefenseClaw is installed, the guardrail profile explain answer. With -GroupSid it says whether each group is in this token.
If the script came from the Internet, run Unblock-File .\Get-DefenseClawEntraIdentity.ps1 first, or launch a trusted copy with powershell.exe -ExecutionPolicy Bypass -File .\Get-DefenseClawEntraIdentity.ps1. An unattended run of an Internet-zone script can hang at a security prompt.
Put an Entra group into the sign-in token
Windows puts an Entra group's SID into a sign-in token only when a built-in local group lists it: Administrators, Users, Guests, Power Users, Remote Desktop Users or Remote Management Users (the rule). Use Users: every signed-in user is already a member through Authenticated Users, so it grants nothing new.
For a fleet, use Intune: an Account protection policy (Local user group membership) with the group Users, the action Add (Update) and the group's SID, or the LocalUsersAndGroups policy CSP. Do not use Add (Replace): it replaces the existing members. See Prepare your Intune tenant.
On one computer, run the script elevated:
.\Add-EntraGroupToLocalGroup.ps1 -GroupSid S-1-12-1-1864145422-1280850733-3047453086-4192786374 -WhatIf
.\Add-EntraGroupToLocalGroup.ps1 -GroupSid S-1-12-1-1864145422-1280850733-3047453086-4192786374- It adds the SID to Users with
NetLocalGroupAddMembers. It is idempotent and reportsAdded,AlreadyMember,RemovedorNotMember.-Removeundoes it. - It warns when you name a group other than the six Windows reads, and when you name Administrators, which makes every member of the Entra group a local administrator.
- Intune platform scripts receive no arguments, so use Account protection for fleet delivery.
Then have the users sign out and back in. A new sign-in token can take up to 4 hours to carry a membership change.
Install DefenseClaw
Install per user as in the Quickstart, or deploy the standalone enterprise profile with Setup or your MDM (Enterprise on Windows, Intune on Windows). The standalone enterprise profile reads each user's token groups through the SYSTEM enumerator. A per-user install can match only users, connectors and agents assignments.
Map and check
Name the group by its SID in a groups assignment; the computer cannot resolve an Entra group's name. Then check the user, as in Map users and groups to profiles and Check.
Group changes
The token is fixed at sign-in, so a group change reaches DefenseClaw when the user signs in again.
- About 15 seconds after a sign-in, the enumerator reads the new token. The next hook request uses the new groups (the spool is checked every 5 seconds), and
profile-explainagrees. - For a signed-out user, the enumerator uses the token it saw at the last sign-in.
- A new Entra group SID may also need
dsregcmd /refreshprtand another sign-in.
Troubleshooting
Identity problems and their fixes are in Troubleshooting: Entra ID on Windows.
Deploy with Microsoft Entra ID
Deploy DefenseClaw with Microsoft Entra ID on Windows, Linux and macOS: pick a setup, prepare the tenant, map groups to guardrail profiles, check records.
Entra ID on macOS
Use Microsoft Entra ID users with DefenseClaw on a Mac with Platform SSO, and carry Entra group membership in a local group with a bridge script.