Deploy with Microsoft Entra ID

Use Microsoft Entra ID users and groups with DefenseClaw on Entra-joined Windows, on Linux (Azure Entra SSH sign-in, Himmelblau, or Microsoft Entra Domain Services with SSSD) and on macOS with Platform SSO. Get Entra groups to the operating system, map users and groups to guardrail profiles, and check what DefenseClaw records. Starter scripts and configs included.

DefenseClaw never calls Microsoft Entra ID or Microsoft Graph. A user signs in to the computer with Entra ID, the computer gives that user an operating system account, and DefenseClaw reads the account the way it reads any other: the SID and sign-in token on Windows, NSS on Linux, Open Directory on macOS. A groups assignment can name an Entra group only where the operating system knows the membership. What is read from where is in How DefenseClaw knows who a user is. Guardrail profiles apply to per-user installs and to the standalone enterprise profile; the Secure Client profile rejects them.

Not part of the release certification

Active Directory is the certified identity stack. The Entra setups below were last verified live in October 2026 with Claude Code on Entra-joined Windows 11, Ubuntu 22.04 on Azure (Entra SSH sign-in), Ubuntu 24.04 with Himmelblau 5.0.0, RHEL 9.8 on Entra Domain Services, and macOS 15.8 with Platform SSO. Hybrid-joined Windows, Entra Kerberos and Himmelblau 4.x were not tested.

Pick your setup

SetupUsers sign in withDefenseClaw seesA groups assignment can name
Entra-joined Windows 10 or 11Entra ID at the Windows sign-in screenDirectory entra_id, the user SID, the UPN and the tenant IDStandalone enterprise: an Entra group by SID, once a built-in local group lists it (step 2). Per-user install: no groups, use users
Azure Linux VM with Entra SSH sign-inaz ssh vm, with the aad moduleDirectory entra_id, source nss_aad, the UPNNo Entra group: the module gives only a private group. Use users, or one of the two routes below
Linux with Himmelblaussh with the Entra password, an MFA code and a Hello PINDirectory entra_id, source himmelblau; the UPN when accounts are named by itThe user's Entra groups, by name (Himmelblau)
Linux joined to Microsoft Entra Domain Servicesssh with the Entra password, through SSSDDirectory active_directory and the domain. Per-user: source sssd; standalone enterprise: sssd_infopipe with the UPNThe synced Entra groups, as name@domain unless SSSD uses short names (Entra Domain Services)
Mac with Platform SSO (Company Portal)Entra ID at the macOS login windowStandalone enterprise: directory entra_id, source macos_platform_sso, the UPN. Per-user: directory localNo Entra group. A local group that carries the membership (step 4)
Linux desktop enrolled in IntuneA local account; Intune does not sign users inDirectory localLocal groups

If a groups assignment matches no one, the usual cause is that the operating system does not know the Entra group. Check as the user with the OS's own tools: whoami /groups on Windows, id on Linux and macOS. If the group is not listed there, no DefenseClaw setting can match it.

Starter kit

The scripts and example configs are in packaging/identity/entra. Every script has --help (or Get-Help), reads credentials from the environment and never from arguments, and changes nothing until you say so: the Python and shell scripts print a plan unless you pass --apply, and the PowerShell script supports -WhatIf.

FileUse
entra_setup.pyMicrosoft Graph helper: create groups and users from a JSON file, read the Windows SID of a group or user, compute a SID from an object id offline
setup-entra-ssh-linux.shEnable Entra SSH sign-in on an Azure Linux VM and grant the sign-in role
Add-EntraGroupToLocalGroup.ps1Put an Entra group's SID into a built-in local group, so the group appears in sign-in tokens
Get-DefenseClawEntraIdentity.ps1Read-only: the join state, the Entra accounts, the token's groups and what DefenseClaw answers
setup-himmelblau.shInstall Himmelblau on Ubuntu 24.04, write himmelblau.conf and restart it safely; check is read-only
join-entra-domain-services.shJoin a Linux host to an Entra Domain Services managed domain, switch between qualified and short names, clear the SSSD cache; check is read-only
macos-entra-group-bridge.shAdd a Mac user to, or remove them from, the local group that stands for an Entra group
macos-platform-sso.settings-catalog.example.jsonThe Intune settings catalog body for Platform SSO with Company Portal
admin-config.windows.example.yaml, per-user-profiles.example.yaml, tenant.example.jsonStarting points for the standalone config, a per-user config and the tenant setup file

1. Prepare the tenant

DefenseClaw needs nothing special from the tenant. You need the groups and users your profiles will name, and the SID of each group. The tests ran on a tenant with no paid licence and security defaults off so a scripted password sign-in works; that is a test convenience, not a requirement.

Create an app registration with the application permissions Group.ReadWrite.All, User.ReadWrite.All and Organization.Read.All (read-only check needs Organization.Read.All and Policy.Read.All; sids needs Group.Read.All and User.Read.All), grant admin consent, and give the script its credentials through the environment:

export AZURE_TENANT_ID=00000000-0000-0000-0000-000000000000
export AZURE_CLIENT_ID=00000000-0000-0000-0000-000000000000
read -rs AZURE_CLIENT_SECRET && export AZURE_CLIENT_SECRET   # type it; it stays out of your history

python3 entra_setup.py check                                  # tenant, domains, security defaults
cp tenant.example.json tenant.json                            # edit the domain, groups and users
python3 entra_setup.py apply --config tenant.json             # a preview; changes nothing
python3 entra_setup.py apply --config tenant.json --apply --password-file users.txt
python3 entra_setup.py sids --group defenseclaw-ml-team

A token in GRAPH_ACCESS_TOKEN works instead of the app registration. The script creates missing objects, leaves existing users unchanged and adds requested group memberships where allowed, so it is safe to run again. New users get a generated password that goes only to the --password-file (mode 0600). A Microsoft Graph read failure stops the plan, including a preview. Group references in the config match planned groups without regard to letter case. The script refuses existing dynamic or mail-enabled groups; use a static security group.

sids prints the object ID and the Windows SID of the group:

group defenseclaw-ml-team
      object id  6f1c9a0e-3b2d-4c58-9e71-a4b5c6d7e8f9
      SID        S-1-12-1-1864145422-1280850733-3047453086-4192786374

Windows shows an Entra group only by this SID. The SID is four 32-bit words of the object ID, so entra_setup.py sid-from-object-id 6f1c9a0e-... computes it without a tenant.

2. Windows: Entra-joined computers

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 AADLoginForWindows extension 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\EntraAlice for entra-alice@...), and a SID that starts with S-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. 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.

.\Get-DefenseClawEntraIdentity.ps1
.\Get-DefenseClawEntraIdentity.ps1 -GroupSid S-1-12-1-1864145422-1280850733-3047453086-4192786374

It prints the dsregcmd /status join state, the Entra accounts in the identity store (SID, UPN, provider), the tenant, the groups in the sign-in token with the Entra SIDs marked, the built-in local groups that list an Entra SID, and, when DefenseClaw is installed, the answer of guardrail profile explain. With -GroupSid it says whether each group is in this token.

Put an Entra group into the sign-in token

An Entra-joined computer puts an Entra group's SID into a sign-in token only when a built-in local group lists it. Without that, a groups assignment or an enrollment group filter that names the group matches no one. The rule and its limits are in Entra groups on Windows. For a fleet, use an Intune policy; see Prepare your Intune tenant. To make the membership on one computer, run the script elevated. Intune platform scripts receive no arguments, so use Account protection for fleet delivery.

.\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

The script adds the SID to the built-in Users group with the Windows API NetLocalGroupAddMembers. It is idempotent and reports Added, AlreadyMember, Removed or NotMember; -Remove undoes it. It warns when you name a group other than the six Windows reads, and when you name Administrators, because that makes every member of the Entra group a local administrator. After the membership exists, the user signs out and back in. net localgroup may not list an Entra SID the computer cannot resolve; use the diagnostic's -GroupSid check, which reads the token.

Install DefenseClaw

Install per user as in Install, or deploy the standalone enterprise profile with Setup or your MDM (Enterprise on Windows, Intune on Windows). A per-user install has no group list on Windows, so only users, connectors and agents assignments can match there. The standalone enterprise profile reads each user's token groups through the SYSTEM enumerator.

3. Linux

Linux has three ways to sign Entra users in, and only two give the host the user's Entra groups:

RouteEntra groups on the host
Azure Entra SSH sign-in (aad module)None: each account has only its private group
HimmelblauThe user's Entra groups, named in id and initgroups
Entra Domain Services with SSSDThe synced Entra groups, as Active Directory groups

Azure VMs with Entra SSH sign-in

Enable the sign-in on the VM. The script enables the VM's system-assigned identity, installs the AADSSHLoginForLinux extension and grants the Virtual Machine User Login role (--admin grants Virtual Machine Administrator Login, which carries sudo rights). It prints a plan until you add --apply:

./setup-entra-ssh-linux.sh -g my-rg -n my-vm --user alice@contoso.onmicrosoft.com --group defenseclaw-ml-team
./setup-entra-ssh-linux.sh -g my-rg -n my-vm --user alice@contoso.onmicrosoft.com --group defenseclaw-ml-team --apply

Users sign in with the Azure CLI:

az extension add --name ssh
az ssh vm -g my-rg -n my-vm

The aad module adds itself to passwd and group in /etc/nsswitch.conf, and names the account by the UPN. It gives the account only its private group, so a groups assignment cannot name an Entra group here:

$ id
uid=9246366(alice@contoso.onmicrosoft.com) gid=9246366(alice@contoso.onmicrosoft.com) groups=9246366(alice@contoso.onmicrosoft.com)
$ getent group defenseclaw-ml-team
$

Assign profiles by users, or add a local group of your own. Install DefenseClaw per user as that user, as in Install. The Entra role is only for sign-in; DefenseClaw does not use it. The standalone enterprise package on an Entra Linux VM was not tested.

Himmelblau

Himmelblau is an open-source (GPL-3.0) NSS, PAM and SSH module that signs Entra users in to Linux and reads their Entra groups. It needs no app registration. The test used the 5.0.0 nightly build on Ubuntu 24.04, the only free channel at the time; the 4.0.5 stable packages need a paid entitlement token and were not tested.

Before users sign in. Entra refuses remote sign-in through Himmelblau for a user with no MFA method registered (AADSTS50072, "Remote session with unenrolled MFA user denied"). Have each user register an authenticator app at Security info. The first sign-in then asks for the Entra password, the code and a new Windows Hello PIN of at least six characters, and joins the computer to Entra: it creates a device object, so your users need permission to join devices.

Install and configure as root; the script prints its plan first:

GROUP_OBJECT_ID=00000000-0000-0000-0000-000000000000   # the Entra group object id
sudo ./setup-himmelblau.sh install --domain contoso.onmicrosoft.com --allow-group "$GROUP_OBJECT_ID"
sudo ./setup-himmelblau.sh install --domain contoso.onmicrosoft.com --allow-group "$GROUP_OBJECT_ID" --apply
./setup-himmelblau.sh check --user alice@contoso.onmicrosoft.com

The packages add himmelblau to the passwd, group and shadow lines of nsswitch.conf and to PAM, but write no /etc/himmelblau/himmelblau.conf, and the daemon does not start without its domain. The script writes these keys:

KeyWhy
domain = contoso.onmicrosoft.comThe tenant
cn_name_mapping = falseNames accounts by their UPN. With the default (true) accounts are named alice, carry no UPN or domain, and a users entry written as a UPN never matches. Groups match either way
pam_allow_groups = <object id>,...Only members of these Entra groups may sign in. Without it every user of the tenant can. It takes object IDs, not names
home_attr, home_alias = CN, use_etc_skel = trueHome directories named by the account

id names the Entra groups, but getent group ml-team answers nothing: Himmelblau finds a group only by gid or object ID. DefenseClaw matches the names id reports without regard to case (Unicode case folding); spaces and accents still belong to the name. Quote a name with spaces in YAML, for example groups: ["Research ML Team"]. The records carry directory entra_id, source himmelblau, assurance verified, a posix_uid, the private group plus the Entra groups in group_count, and the SSH session.

  • Group changes. Himmelblau caches an account for 300 seconds (cache_timeout). In the test a removal showed in id after 1 minute 46 seconds and an addition after 4 minutes 58 seconds; a new sign-in, or sudo aad-tool cache-clear, shows it at once. DefenseClaw then picks it up within its 15-minute cache.
  • Entra unreachable. Cached accounts and groups keep answering, across a daemon restart. A new SSH sign-in of an MFA user is refused (PAM_ABORT: Network outage detected) unless Himmelblau's offline_breakglass is set up (off by default, not tested).
  • Daemon down or restarting. id shows the Entra groups as bare numbers. DefenseClaw keeps such an answer for 2 minutes instead of 15, so a group member gets the group profile again within about 2 minutes of the daemon's return.
  • Restart with the script. On the 5.0.0 nightly, a second systemctl restart himmelblaud himmelblaud-tasks left the units stuck (inactive (dead-resources-pinned)) until systemctl clean --what=fdstore himmelblaud.service. setup-himmelblau.sh restart --apply stops the sockets and daemons, clears the stored descriptors and starts them again; configure restarts the same way.
  • Reconfigure. configure --apply writes the keys above and removes any other himmelblau.conf settings. Its preview names the unmanaged keys, and each apply keeps a timestamped backup. An omitted --allow-group preserves an existing pam_allow_groups; use --allow-all to remove it.

To remove Himmelblau, first delete the host's Entra device object in the Entra admin center, and keep user homes until their owners have copied any needed data. Then:

sudo systemctl stop himmelblaud.service himmelblaud-tasks.service
sudo apt-get purge himmelblau nss-himmelblau pam-himmelblau himmelblau-sshd-config himmelblau-apparmor
sudo rm /etc/apt/sources.list.d/himmelblau.list /etc/apt/keyrings/himmelblau.gpg
sudo rm -r /etc/himmelblau /var/lib/himmelblaud
sudo apt-get update

Review /etc/nsswitch.conf and PAM for remaining Himmelblau entries before the next sign-in.

Microsoft Entra Domain Services with SSSD

Microsoft Entra Domain Services runs a managed Active Directory domain that syncs the tenant's users and groups. A Linux host joins it with realm join like any AD domain, SSSD reads the Entra groups as AD groups, and DefenseClaw reports the account as active_directory. The managed domain bills while it exists (about US$0.15 an hour for the Standard SKU in the test), plus the VMs.

Create the managed domain once per tenant, in the Azure portal or with ARM:

  1. Register the Microsoft.AAD resource provider. Create the Domain Controller Services service principal, the AAD DC Administrators group and an admin user in it.
  2. Create a VNet with a subnet for the domain and one for the VMs.
  3. Create the managed domain with TLS 1.0 disabled (domainSecuritySettings.tlsV1: Disabled); with the default the create failed. It took about 67 minutes to finish.
  4. Point the VNet's DNS servers at both domain controllers.
  5. Reset or change each user's password once the domain exists, so it gets the NTLM and Kerberos hashes. A self-service change worked within 5 minutes; an administrator reset took about 11 minutes. Repeated failed kinit attempts lock the account for 30 minutes.

Join a host as root:

sudo ./join-entra-domain-services.sh join --domain contoso.onmicrosoft.com --admin dsadmin@contoso.onmicrosoft.com --short-names
sudo ./join-entra-domain-services.sh join --domain contoso.onmicrosoft.com --admin dsadmin@contoso.onmicrosoft.com --short-names --apply
./join-entra-domain-services.sh check --user alice --group ml-team

It installs realmd, SSSD and adcli, and runs realm join --membership-software=adcli -U dsadmin@CONTOSO.ONMICROSOFT.COM contoso.onmicrosoft.com, which asks for the password. The computer account lands in OU=AADDC Computers, and SSSD gets id_provider = ad.

realm join sets use_fully_qualified_names = True, so the host knows the group only as ml-team@contoso.onmicrosoft.com and the user as alice@contoso.onmicrosoft.com. A groups: [ml-team] assignment then selects nobody, and explain names the qualified group the host knows. Either write the qualified name in the assignment, or switch to short names (--short-names, or join-entra-domain-services.sh names short --apply). Both selected the group profile in the test.

DefenseClaw records directory active_directory, source sssd, the domain, the bare account name and the uid SSSD's ID mapping assigns. On standalone enterprise the root guardian reads the UPN from SSSD InfoPipe after the reconcile that enrolls the account, and the source becomes sssd_infopipe; until then the principal is alice@CONTOSO.ONMICROSOFT.COM, and the UPN replaces it within about 2 minutes. A per-user install has no InfoPipe access and keeps the realm-derived principal.

Group changes go through three caches. Entra to the managed domain took about 20 seconds for an addition and 37 seconds for a removal. SSSD keeps an entry for entry_cache_timeout (5,400 seconds by default); after sudo sss_cache -E (join-entra-domain-services.sh flush --apply), id showed the change 172 seconds after the Entra change. DefenseClaw then picks it up within its 15-minute cache. End to end: about 15 minutes with a flush, and up to about 105 minutes with SSSD's defaults.

4. macOS: Platform SSO

Platform SSO with the Microsoft Enterprise SSO plug-in (Company Portal) signs Entra users in at the login window and links each local account to its Entra user. It does not put the user's Entra groups into the macOS group database. The test used macOS 15.8, Company Portal 5.2608.0 and user-driven enrollment in Intune, with the settings catalog policy in macos-platform-sso.settings-catalog.example.json. An existing local account was linked by registration, and a new one was created at the login window. In both cases id -Gn listed only local groups, and dsmemberutil checkmembership did not find the Entra group. With UserAuthorizationMode and NewUserAuthorizationMode set to Groups and AdditionalGroups naming the Entra groups, or with AdministratorGroups, Platform SSO created empty local groups (gid 5000 and up) and never added the user.

So a groups assignment can match only a local group that carries the membership. macos-entra-group-bridge.sh adds the signed-in user to such a group, or removes them, using the group Platform SSO created when one of that name exists:

sudo ./macos-entra-group-bridge.sh add --group ml-team --user alice
sudo ./macos-entra-group-bridge.sh add --group ml-team --user alice --apply
./macos-entra-group-bridge.sh check --group ml-team --user alice

For a fleet, let Intune decide who is in the group, with one signed-in Entra user per Mac, who is also the Mac's primary user. Intune runs the script as root, not as that user, so the script cannot tell who the assignment is for:

  • Fill in the settings block of a copy (ACTION=add, GROUP_NAME=ml-team, USER_NAME=<the Mac account of the Entra user>, APPLY=yes) and assign it to the Entra group, and a copy with ACTION=remove to the users who are not in it (all users, with the Entra group excluded).
  • An Intune copy without USER_NAME stops with exit 2. An add copy changes the named account only while that account is in front at the console; with another user in front or the login window showing it changes nothing and exits 1. In Intune, set Script frequency for both copies (for example, daily) and Max number of times to retry if script fails for the add copy (for example, 3). The defaults run each copy once and never retry a failure. Check the script result and local group membership after sign-in; if the user was never in front during a run, rerun the copy. See Microsoft's macOS shell script settings.
  • The script refuses built-in and privileged groups (admin, wheel, staff, com.apple.*, any group with an id below 500) unless --allow-system-group (ALLOW_SYSTEM_GROUP=yes) is given. remove leaves the group in place; delete it with dseditgroup -o delete <group> when no assignment uses it.

The membership itself was tested; delivery through Intune was not. The member got the group profile on a per-user install and on standalone enterprise, the other user got default_profile, and removing the membership moved her back to the default.

Platform SSO stores each registered account's Entra UPN in its record (AltSecurityIdentities, PlatformSSO:<upn>), which root can read. The standalone enterprise enumerator reads it: the account is directory entra_id, source macos_platform_sso, with the UPN as its principal and domain, so a users assignment by UPN works there. Accounts that never registered stay local. A per-user install cannot read the record and reports local. A new Platform SSO account can enter the full macOS Setup Assistant at first login; sign demonstration users in once before a timed run, or deploy an approved Setup Assistant skip payload.

5. Map users and groups to profiles

Write users assignments with the principal the host actually resolves, and use the SID for Entra groups on Windows. On Azure Linux, check that NSS resolves the account by uid as well as name before relying on a users assignment. Starter files: per-user-profiles.example.yaml and admin-config.windows.example.yaml. The keys are in User- and group-based policies; a UPN compares without regard to case.

guardrail:
  profiles:
    strict: {mode: action, block_at: MEDIUM}
    ml-team: {mode: observe}
  profile_assignments:
    - profile: ml-team
      match:
        users: ["alice@contoso.onmicrosoft.com"]
    - profile: ml-team                       # standalone enterprise on Windows only
      match:
        groups: ["S-1-12-1-1864145422-1280850733-3047453086-4192786374"]
  default_profile: strict
ai_discovery:
  include_user_principal: true               # put the UPN in records; off by default

A per-user config belongs to the user

A per-user install reads ~/.defenseclaw/config.yaml (Windows: %USERPROFILE%\.defenseclaw\config.yaml) from the user's own profile, so the user can change their profile. To enforce a policy the user cannot change, use the standalone enterprise profile, which reads the machine config.

Whereusers by UPNgroups by Entra group
Windows, per-userYesNo: a per-user install has no group list
Windows, standalone enterpriseYes, until the account's UPN is renamed (the SID stays)By SID, after the local group step
Linux aad, per-userYesNo: the module gives no Entra groups
Linux Himmelblau, per-user and standaloneWith cn_name_mapping = falseBy name, as id shows it
Linux Entra Domain Services, per-user and standaloneBy the UPN on standalone enterprise after InfoPipe supplies itml-team@domain, or ml-team with short names
macOS Platform SSO, standaloneBy the UPNOnly a local group that carries the membership
macOS Platform SSO, per-userNo: the account reports local without a UPNOnly a local group

Set a strict default_profile for accounts no assignment selects. A failed lookup refuses requests whose assignments need the missing fact, and the refusal names it (why).

6. Check

Ask the gateway which profile a user gets. On Windows, name an Entra user by SID, as AzureAD\Name, by the bare name or by the UPN.

# Standalone enterprise: run in an elevated Administrator prompt.
& 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows profile-explain --user 'AzureAD\Alice' --connector claudecode
# Per-user install:
defenseclaw guardrail profile explain --connector claudecode
defenseclaw guardrail profile explain --connector claudecode
# standalone enterprise, as root:
sudo /opt/defenseclaw/bin/defenseclaw-gateway enterprise linux profile-explain --user alice --connector claudecode
sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos profile-explain --user alice --connector claudecode

profile names the profile and match says user or group; another Entra user gets default_profile. The fields the records carry for an Entra user (the complete table is Entra ID fields, as seen live):

FieldWindowsLinux aad
defenseclaw.user.nameThe account name Windows assigns (EntraAlice), not the UPNThe UPN's account part
defenseclaw.user.principalThe UPNThe UPN, in lower case
defenseclaw.user.directory, .identity.sourceentra_id, windows_identity_storeentra_id, nss_aad
defenseclaw.user.tenant_idThe tenant IDNot reported
defenseclaw.user.group_count0 on a per-user install1, the private group

7. What to expect in operation

  • A group change on Windows reaches DefenseClaw when the user signs in again: the token is fixed at sign-in. The enumerator decides a signed-out user from the token it saw at the last sign-in. After a sign-in the enumerator reads the new token about 15 seconds later. A new group record for the account then drops the old directory facts, and the next hook request uses the new groups, subject to the short spool check interval (5 seconds), so profile-explain and the hooks agree. In the tests the token changed at the next sign-in, two to three minutes after the tenant change. Microsoft documents that a new token can take up to 4 hours to carry a change.
  • A group change on Linux takes the Himmelblau or SSSD cache time plus DefenseClaw's 15 minutes. On macOS a change reaches DefenseClaw when the bridge script runs again.
  • A user who has not signed in yet. On Windows, the host may resolve an Entra name or UPN to a SID before first sign-in, but it has no sign-in token for group membership. On Azure Linux, NSS may resolve a name before it can map a uid back to the account; profile explain reports unixidentity: not found then.
  • An Entra outage or no network. In a nine-minute Windows sign-in endpoint outage test, open sessions kept the same hook decisions, including after a gateway restart: DefenseClaw reads the identity store, join state and token locally. Windows refused a new password sign-in while the endpoint was unavailable. On Linux, a failed lookup refuses an assignment that needs the missing fact (default_lookup_failed) and names that fact after the gateway's cached answer expires (up to an hour); see the lookup rules.

Troubleshooting

SymptomCause and fix
A groups assignment with an Entra group never matches on WindowsThe group is not in the token. Name it by SID, have a built-in local group list it, verify the account belongs to that Entra security group, then sign out and in. Check with Get-DefenseClawEntraIdentity.ps1 -GroupSid
profile explain --user <name> on Windows says "Windows has no account by this name"The host cannot resolve that name now. Check the spelling and try the SID, AzureAD\Name or the UPN
group_count is 0 and groups never match on a per-user Windows installExpected: use users, or the standalone enterprise profile
getent group finds no Entra group on the Linux VMExpected: the aad module gives no Entra groups. Use users, Himmelblau or Entra Domain Services
getent group ml-team finds nothing on a Himmelblau host, but id lists the groupExpected: Himmelblau finds groups only by gid or object ID. DefenseClaw matches the name id shows
A user outside pam_allow_groups completes password, MFA and Hello PIN enrollment but SSH refuses them; the log says "User account has expired"Check that the user belongs to an allowed Entra group before enrollment, then verify the group object ID in pam_allow_groups
SSH sign-in through Himmelblau asks for the password again; the log says "Remote session with unenrolled MFA user denied"The user has no MFA method. Register one at Security info, then sign in
himmelblaud is inactive (dead-resources-pinned) after a restartThe 5.0.0 nightly restart issue. Run setup-himmelblau.sh restart --apply
A users entry by UPN never matches on a Himmelblau hostcn_name_mapping is true (the default). Set it to false, or name the account by its short name
explain says a group is not known to this host by that name and names ml-team@domainSSSD uses qualified names. Write the qualified name, or switch to short names
id on a Mac shows no Entra group after Platform SSO registrationExpected: Platform SSO gives no groups. Use the bridge script, or users on standalone enterprise
The records of a Platform SSO user say localA per-user install cannot read the Platform SSO link; standalone enterprise reports entra_id
profile explain says unixidentity: not found for an Entra user on LinuxThis host's NSS lookup cannot map the uid back to the account. Confirm with id and getent passwd, then ask again
Records have no principalai_discovery.include_user_principal is off, the default
az ssh vm is refusedMicrosoft requires the AADSSHLoginForLinux extension and a VM login role for the user. setup-entra-ssh-linux.sh without --apply lists what is missing
Add-EntraGroupToLocalGroup.ps1 says to run elevatedIt changes a local group. Run it as an administrator or SYSTEM, or use -WhatIf

Next steps