AAD-TOOL(1)
π NAME β¨
aad-tool β the Azure Entra ID (AAD) management utility for Himmelblau, bestie. This is the aad-tool(1) manual page and we are gonna get through it together π«Ά
πΈ SYNOPSIS πΈ
aad-tool <COMMAND> [OPTIONS]
π¦ DESCRIPTION π¦
Okay so aad-tool is part of the Himmelblau project, and its whole thing is managing and interacting with Azure Entra ID through a bunch of different commands. It lets you test authentication, manage caches, and check the status of services related to the himmelblaud resolver. That's the vibe π
β SYNOPSIS (yes, again) β
aad-tool <COMMAND>
π DESCRIPTION β Himmelblau Management Utility π
Literally what it says on the tin: it's the Himmelblau Management Utility. Periodt.
π Commands:
applicationβ manage Entra ID application registrations, including creation, listing, and extension schema configuration β¨auth-testβ test authentication of a user via the himmelblaud resolver "pam" channel. Important: this does not test that your pam configuration is correct β only that himmelblaud is correctly processing and validating authentications π«Άcache-clearβ clear or invalidate the himmelblaud resolver cachecache-invalidateβ (Deprecated) previously used to mark cache entries as stale for immediate refresh. Now behaves identically tocache-clearand will be removed in a future release πconfigure-pamβ configure PAM to usepam_himmelblaucredβ manage confidential client credentials for authenticating to Entra IDenumerateβ enumerate all users and groups in Entra ID that haverfc2307attributes, and cache their values locally. This addresses the issue where UID/GID mappings are needed before authentication can succeed, but are normally only retrievable after login. Iconic problem-solving ngl πuserβ manage Entra ID user accounts, including POSIX attribute assignment and UID mappinggroupβ manage Entra ID groups, including POSIX attribute assignment and GID mappingidmapβ manage the static idmapping cache used to map Entra ID accounts to static UID/GID values. This is useful for migrations from on-prem AD to Entra ID, where existing UID/GID mappings need to be preserved π§offline-breakglassβ activate or deactivate Himmelblau's offline breakglass modestatusβ check that the himmelblaud daemon is online and able to connect correctly to the himmelblaud servertpmβ check whether Himmelblau is utilizing the TPMversionβ show the version of this toolhelpβ print this message or the help of the given subcommand(s)
β¨ OPTIONS β¨
-h,--helpβ print help
π SUBCOMMAND
aad-tool application add-schema-extensions
aad-tool application add-schema-extensions [OPTIONS] --client-id <CLIENT_ID> --schema-app-object-id <SCHEMA_APP_OBJECT_ID>
π¦ DESCRIPTION π¦
Adds a standard set of POSIX-related schema extensions to an existing Entra ID application. So slay of it.
This command registers directory extension attributes (like uidNumber, gidNumber, unixHomeDirectory, loginShell, gecos) on the application specified by --schema-app-object-id. These extensions will be usable on user and/or group objects, as appropriate π
The application specified by --schema-app-object-id must already exist in the tenant, and must be identified by its Object ID (not the Client ID β say it louder for the people in the back π). This value is labeled as "Object ID" in the Entra Admin Center and corresponds to the id field in Graph API responses.
You must also supply a separate --client-id that grants Application.ReadWrite.All permissions to perform the extension registration.
If the --name parameter is omitted, the command authenticates as the currently logged-in user via the Himmelblau SSO broker. If the --name parameter is provided, the command attempts to authenticate as the specified Entra ID user. In this case, the command must be run as root to impersonate another user π₯
This command must be run from a device that has already been joined to Entra ID.
β¨ OPTIONS β¨
-d,--debugβ the manual lists it with zero blurb, so I'm not gonna invent one, bestie π«Ά-D,--name <ACCOUNT_ID>β same deal, no blurb here either--client-id <CLIENT_ID>β also blurb-less in the original--schema-app-object-id <SCHEMA_APP_OBJECT_ID>β yep, also just listed-h,--helpβ print help (see a summary with-h)
π SUBCOMMAND
aad-tool application create
aad-tool application create [OPTIONS] --client-id <CLIENT_ID> --display-name <DISPLAY_NAME>
π¦ DESCRIPTION π¦
Creates a new Entra ID application registration in the current tenant. Main character energy fr fr π
This command performs a delegated Microsoft Graph API request using an access token acquired via the specified client application (--client-id), which must have Application.ReadWrite.All permissions in the tenant.
The new application will be created with the provided --display-name.
You may specify one or more --redirect-uri options to configure redirect URIs for the application (used for public client authentication). If no redirect URIs are provided, the application will not include any by default πΈ
Use the --user-read-write and/or --group-read-write flags to grant the application additional Microsoft Graph API permissions at registration time, including User.ReadWrite.All and Group.ReadWrite.All.
β οΈ NOTE, and I mean it: if you grant these permissions, it is strongly recommended that you restrict access to the application to specific administrators or groups:
- In the Microsoft Entra admin portal, go to Entra???ID -> Enterprise applications and find your app's entry. (Yes, that's literally how it's printed in the manual β the little arrow glyph glitched out π don't come for me.)
- Under Properties, set "Assignment required?" to Yes.
- Go to Users and groups, click Add, and assign only the specific users or groups you want to have access.
If the --name parameter is omitted, the command authenticates as the currently logged-in user via the Himmelblau SSO broker. If the --name parameter is provided, the command attempts to authenticate as the specified Entra ID user. In this case, the command must be run as root to impersonate another user π
This command must be run from a device that has already been joined to Entra ID.
β¨ OPTIONS β¨
-d,--debugβ listed, no blurb, moving on π«Ά-D,--name <ACCOUNT_ID>β listed, no blurb--client-id <CLIENT_ID>β listed, no blurb--display-name <DISPLAY_NAME>β listed, no blurb--redirect-uri <URI>β listed, no blurb--user-read-writeβ listed, no blurb--group-read-writeβ listed, no blurb-h,--helpβ print help (see a summary with-h)
π SUBCOMMAND
aad-tool application list-schema-extensions
aad-tool application list-schema-extensions [OPTIONS] --client-id <CLIENT_ID> --schema-app-object-id <SCHEMA_APP_OBJECT_ID>
π¦ DESCRIPTION π¦
Lists the schema extension attributes registered on an Entra ID application. Receipts, basically π§Ύβ¨
This command retrieves the directory extension attributes (like uidNumber, gidNumber, etc.) that have been added to the application identified by --schema-app-object-id.
The --schema-app-object-id parameter must be the Object ID of the application (not the Client ID), as shown in the Entra Admin Center. This value corresponds to the id field in Microsoft Graph and is required to query extension properties.
You must also supply a separate --client-id that grants Application.Read.All or Application.ReadWrite.All permissions in the tenant to perform this query.
If the --name parameter is omitted, the command authenticates as the currently logged-in user via the Himmelblau SSO broker. If the --name parameter is provided, the command attempts to authenticate as the specified Entra ID user. In this case, the command must be run as root to impersonate another user.
This command must be run from a device that has already been joined to Entra ID.
β¨ OPTIONS β¨
-d,--debugβ listed, no blurb π-D,--name <ACCOUNT_ID>β listed, no blurb--client-id <CLIENT_ID>β listed, no blurb--schema-app-object-id <SCHEMA_APP_OBJECT_ID>β listed, no blurb-h,--helpβ print help (see a summary with-h)
π SUBCOMMAND
aad-tool application list
aad-tool application list [OPTIONS] --client-id <CLIENT_ID>
π¦ DESCRIPTION π¦
Lists Entra ID application registrations in the current tenant. It's giving inventory day π
This command performs a delegated Microsoft Graph API request using an access token acquired via the specified client application (--client-id), which must have Application.Read.All permissions in the tenant.
If the --name parameter is omitted, the command authenticates as the currently logged-in user via the Himmelblau SSO broker. If the --name parameter is provided, the command attempts to authenticate as the specified Entra ID user. In this case, the command must be run as root to impersonate another user π
This command must be run from a device that has already been joined to Entra ID.
β¨ OPTIONS β¨
-d,--debugβ listed, no blurb π«Ά-D,--name <ACCOUNT_ID>β listed, no blurb--client-id <CLIENT_ID>β listed, no blurb-h,--helpβ print help (see a summary with-h)
π SUBCOMMAND
aad-tool auth-test
aad-tool auth-test [OPTIONS] --name <ACCOUNT_ID>
π¦ DESCRIPTION π¦
Test authentication of a user via the himmelblaud resolver "pam" channel. And listen β this does not test that your pam configuration is correct, only that himmelblaud is correctly processing and validating authentications. Read that twice, it matters ππ
β¨ OPTIONS β¨
-d,--debugβ listed, no blurb-D,--name <ACCOUNT_ID>β listed, no blurb-h,--helpβ print help
π SUBCOMMAND
aad-tool cache-clear
aad-tool cache-clear [OPTIONS]
π¦ DESCRIPTION π¦
Clear or invalidate the himmelblaud resolver cache. Spring cleaning but make it enterprise π§Ήβ¨
By default, this marks all cached user and group entries as stale, forcing them to refresh immediately when next used.
Specify --nss or --mapped to clear these individual caches as well. Omit both these to clear them all.
Use --full to completely purge the user and group cache entries and unjoin the host from Entra ID.
π This is irreversible. Like, actually irreversible. Not "oops I can undo it" irreversible. Be sure.
β¨ OPTIONS β¨
-d,--debugβ listed, no blurb π«Ά--nssβ only clear the nss cache--mappedβ only clear the mapped name cache--fullβ force a full cache wipe and unjoin the host from Entra ID. This is probably not what you want π (the manual says that, not me)-h,--helpβ print help (see a summary with-h)
π SUBCOMMAND
aad-tool cache-invalidate
aad-tool cache-invalidate [OPTIONS]
π¦ DESCRIPTION π¦
(Deprecated) bestie it's on its way out π Previously used to mark cache entries as stale for immediate refresh. Now behaves identically to cache-clear and will be removed in a future release.
β¨ OPTIONS β¨
-d,--debugβ listed, no blurb--nssβ listed, no blurb--mappedβ listed, no blurb--fullβ listed, no blurb-h,--helpβ print help
π SUBCOMMAND
aad-tool configure-pam
aad-tool configure-pam [OPTIONS]
π¦ DESCRIPTION π¦
Configure PAM to use pam_himmelblau. That's the whole description, she's brief and she knows it π
β¨ OPTIONS β¨
-d,--debugβ listed, no blurb--reallyβ listed, no blurb π«Ά (name's doing a lot of work there)--auth-file <AUTH_FILE>β listed, no blurb--account-file <ACCOUNT_FILE>β listed, no blurb--session-file <SESSION_FILE>β listed, no blurb--password-file <PASSWORD_FILE>β listed, no blurb-h,--helpβ print help
(part 1 done, but we're not done β more coming β¨)
πΈ SUBCOMMAND β aad-tool cred cert
aad-tool cred cert [OPTIONS] --client-id <CLIENT_ID> --domain <DOMAIN>
--valid-days <VALID_DAYS> --cert-out <CERT_OUT>
π DESCRIPTION
Okay so this one generates an RS256 HSM-backed key pair with a self-signed certificate, all for confidential client authentication. Bestie, the key pair literally lives in your hardware. Iconic behavior.
To set this up, here's the whole vibe:
- In the Entra ID portal, navigate to Azure Active Directory -> App registrations, then open (or create) your application.
- Under Manage > Certificates & secrets, go to the Certificates tab.
- Click Upload certificate and select the PEM file generated by this command.
- Azure will store this cert for authenticating via public key.
The private key never leaves your TPM (or SoftHSM). Like, not once. It's giving β¨boundariesβ¨.
When this cred needs renewed in the future, simple run this command again to replace the expired certificate. That's the whole renewal arc, no drama.
Example: aad-tool cred cert --client-id <CLIENT_ID> --valid-days 365 --cert-out /tmp/my-cert.crt
β¨ OPTIONS
-d,--debugβ turn on the debug chatter π--client-id <CLIENT_ID>β The Azure AD application (client) ID this certificate is associated with--domain <DOMAIN>β The tenant domain this certificate is associated with--valid-days <VALID_DAYS>β Number of days the self-signed certificate will be valid--cert-out <CERT_OUT>β Path to write the generated PEM certificate file. This is the file you will upload to Entra ID. Don't lose it, mkay? π-h,--helpβ Print help (see a summary with-h)
π¦ SUBCOMMAND β aad-tool cred delete
aad-tool cred delete [OPTIONS] --domain <DOMAIN>
π DESCRIPTION
Delete confidential client credentials (secret, certificate, or both). Lowkey the Marie Kondo of creds π
This deletes stored confidential client credentials from Himmelblau's encrypted cache. If neither --secret nor --cert is specified, both will be deleted. No picking favorites, everything goes.
Example: aad-tool cred delete --domain <DOMAIN> aad-tool cred delete --domain <DOMAIN> --secret aad-tool cred delete --domain <DOMAIN> --cert
β¨ OPTIONS
-d,--debugβ debug mode, on π--domain <DOMAIN>β The tenant domain whose creds will be deleted--secretβ Delete only the client secret (not the certificate)--certβ Delete only the client certificate (not the secret)-h,--helpβ Print help (see a summary with-h)
π SUBCOMMAND β aad-tool cred list
aad-tool cred list [OPTIONS] --domain <DOMAIN>
π DESCRIPTION
List the presence of confidential client credentials β like a vibe check for your cache π
This checks Himmelblau's encrypted cache to see whether a client secret and/or client certificate exists for the given domain.
Example: aad-tool cred list --domain <DOMAIN>
β¨ OPTIONS
-d,--debugβ debug mode--domain <DOMAIN>β the domain to check, obvs-h,--helpβ Print help (see a summary with-h)
π SUBCOMMAND β aad-tool cred secret
aad-tool cred secret [OPTIONS] --client-id <CLIENT_ID> --domain <DOMAIN>
--secret <SECRET>
π DESCRIPTION
Store a client secret for confidential client authentication. Ok so here's the recipe π§βπ³
- In the Entra ID portal, navigate to Azure Active Directory -> App registrations, then open (or create) your application.
- Under Manage > Certificates & secrets, go to the Client secrets tab.
- Click New client secret, choose an expiry, and click Add.
- Copy the Value (not Secret ID) immediately. You won't be able to see it again. Like, ever. π
- Use that value with this command to store it in Himmelblau's encrypted cache.
When this cred needs renewed in the future, simple run this command again to replace the expired secret.
Example: aad-tool cred secret --client-id <CLIENT_ID> --secret <SECRET_VALUE>
β οΈ Real talk: grab the Value, not the Secret ID. The portal will not show it to you twice and there is no undo.
β¨ OPTIONS
-d,--debugβ debug mode--client-id <CLIENT_ID>β The Azure AD application (client) ID this secret is associated with--domain <DOMAIN>β The tenant domain this secret is associated with--secret <SECRET>β The client secret value copied from the Entra ID portal-h,--helpβ Print help (see a summary with-h)
π SUBCOMMAND β aad-tool enumerate
aad-tool enumerate [OPTIONS]
π DESCRIPTION
Enumerate all users and groups in Entra ID that have rfc2307 attributes, and cache their values locally. This addresses the issue where UID/GID mappings are needed before authentication can succeed, but are normally only retrievable after login. It's giving catch-22, and we said not today π
The --client-id parameter is optional and must refer to a registered Entra ID application with User.Read.All and Group.Read.All permissions.
The --name parameter specifies the Entra ID user on whose behalf the token is requested, enabling delegated access through the specified client application.
This command can only be executed from an Entra Id enrolled host. No enrolled host, no enumeration, periodt.
β¨ OPTIONS
-d,--debugβ debug mode-D,--name <ACCOUNT_ID>β the user on whose behalf the token is requested--client-id <CLIENT_ID>β optional client app for delegated access-h,--helpβ Print help (see a summary with-h)
π SUBCOMMAND β aad-tool group set-posix-attrs
aad-tool group set-posix-attrs [OPTIONS] --schema-client-id
<SCHEMA_CLIENT_ID> --group-id <GROUP_ID> --gid <GID>
π DESCRIPTION
Sets POSIX-related attributes on a specified Entra ID group object. Group glow-up, basically π
This command updates the gidNumber attribute on the Entra ID group identified by --group-id, which must be a valid Object ID.
You must also provide the --schema-client-id, which identifies the application where the extension properties were registered. This value must be the Client ID of the application used for schema registration. The application associated with --schema-client-id must supply Group.ReadWrite.All permissions in the tenant. No permission, no slay.
If the --name parameter is omitted, the command authenticates as the currently logged-in user via the Himmelblau SSO broker. If the --name parameter is provided, the command must be run as root to impersonate another user. Root only, iykyk.
This command must be run from a device that has already been joined to Entra ID.
β¨ OPTIONS
-d,--debugβ debug mode-D,--name <ACCOUNT_ID>β impersonate another user (requiresroot)--schema-client-id <SCHEMA_CLIENT_ID>β the app where the extension properties were registered--group-id <GROUP_ID>β the group's Object ID--gid <GID>β the GID to set-h,--helpβ Print help (see a summary with-h)
π« SUBCOMMAND β aad-tool idmap clear
aad-tool idmap clear [OPTIONS]
π DESCRIPTION
Clear the contents of the idmap static cache. Fresh start energy β¨
β¨ OPTIONS
-d,--debugβ debug mode-h,--helpβ Print help
π§ SUBCOMMAND β aad-tool idmap group-add
aad-tool idmap group-add [OPTIONS] --object_id <OBJECT_ID> --gid <GID>
π DESCRIPTION
Add a static group mapping to the idmap cache. This maps an Entra ID group (by Object Id GUID) to a fixed GID. This can be used to maintain group identity and membership compatibility after moving to Entra ID. Honestly? A lifesaver.
β¨ OPTIONS
-d,--debugβ debug mode-D,--object_id <OBJECT_ID>β the group's Object Id GUID-g,--gid <GID>β the fixed GID to map it to-h,--helpβ Print help
π«Ά SUBCOMMAND β aad-tool idmap user-add
aad-tool idmap user-add [OPTIONS] --name <ACCOUNT_ID> --uid <UID> --gid
<GID>
π DESCRIPTION
Add a static user mapping to the idmap cache. This maps an Entra ID user (by UPN or SAM-compatible name) to a fixed UID and primary group GID. Same energy as above, but for people π«Ά
β¨ OPTIONS
-d,--debugβ debug mode-D,--name <ACCOUNT_ID>β the user's UPN or SAM-compatible name-u,--uid <UID>β the fixed UID-g,--gid <GID>β the primary group GID-h,--helpβ Print help
π₯ SUBCOMMAND β aad-tool offline-breakglass
aad-tool offline-breakglass [OPTIONS]
π DESCRIPTION
Activate or deactivate Himmelblau's offline breakglass mode. Emergency mode, but make it controlled π¨
This command enables temporary offline password authentication when Azure Entra ID is unreachable. When invoked, Himmelblau enters a controlled "breakglass" state, allowing cached Entra ID user passwords to be used for login until the TTL expires.
Breakglass mode can only be activated if it was previously enabled in /etc/himmelblau/himmelblau.conf under the [offline_breakglass] section. If the feature was disabled, calling this command will have no effect, and no password verifiers will have been cached. So likeβ¦ plan ahead, bestie π
Once activated, Himmelblau will:
- Allow cached Entra ID users to log in using their known password.
- Automatically exit breakglass mode after the TTL expires or once Entra ID connectivity has been restored.
Use --ttl to override the configured duration for this session. The TTL value accepts a time unit suffix (m, h, or d) and defaults to the value defined in himmelblau.conf if omitted.
To manually exit breakglass mode before TTL expiry, run: aad-tool offline-breakglass --ttl 0
β¨ OPTIONS
-d,--debugβ debug mode--ttl <TTL>β override the configured duration for this session-h,--helpβ Print help (see a summary with-h)
πΈ EXAMPLES
# Activate breakglass mode for 2 hours
aad-tool offline-breakglass --ttl 2h
# Force disable breakglass mode immediately
aad-tool offline-breakglass --ttl 0
# Use the configured default TTL (from himmelblau.conf)
aad-tool offline-breakglass
Notes:
- If
[offline_breakglass] enabled = falsein himmelblau.conf, this command will do nothing. - Himmelblau will not cache Entra ID password hashes unless offline breakglass has been explicitly enabled in advance.
- This feature should only be used for emergency access during verified outages.
π¨ Lowkey the most important note here: this is emergency access only, during verified outages. It's not a shortcut, it's a fire exit.
π¦ SUBCOMMAND β aad-tool status
aad-tool status [OPTIONS]
π DESCRIPTION
Check that the himmelblaud daemon is online and able to connect correctly to the himmelblaud server. Vibe check on the daemon π«
β¨ OPTIONS
-d,--debugβ debug mode-h,--helpβ Print help
π SUBCOMMAND β aad-tool tpm
aad-tool tpm [OPTIONS]
π DESCRIPTION
Check whether Himmelblau is utilizing the TPM. Is the hardware doing its thing? Let's find out π
β¨ OPTIONS
-d,--debugβ debug mode-h,--helpβ Print help
π SUBCOMMAND β aad-tool user set-posix-attrs
aad-tool user set-posix-attrs [OPTIONS] --schema-client-id
<SCHEMA_CLIENT_ID> --user-id <USER_ID>
π DESCRIPTION
Sets POSIX-related attributes on a specified Entra ID user object. User glow-up, the sequel π
This command updates POSIX attributes (uidNumber, gidNumber, unixHomeDirectory, loginShell, and gecos) on the Entra ID user identified by --user-id, which must be a valid Object ID or UPN.
You must also provide the --schema-client-id, which identifies the application where the extension properties were registered. This value must be the Client ID of the application used for schema registration. The application associated with --schema-client-id must supply User.ReadWrite.All permissions in the tenant.
If the --name parameter is omitted, the command authenticates as the currently logged-in user via the Himmelblau SSO broker. If the --name parameter is provided, the command must be run as root to impersonate another user. Root privileges, no exceptions.
This command must be run from a device that has already been joined to Entra ID.
β¨ OPTIONS
-d,--debugβ debug mode-D,--name <ACCOUNT_ID>β impersonate another user (requiresroot)--schema-client-id <SCHEMA_CLIENT_ID>β the app where the extension properties were registered--user-id <USER_ID>β a valid Object ID or UPN--uid <UID>β setsuidNumber--gid <GID>β setsgidNumber--home <HOME>β setsunixHomeDirectory--shell <SHELL>β setsloginShell--gecos <GECOS>β setsgecos-h,--helpβ Print help (see a summary with-h)
π SEE ALSO
himmelblau.conf(5), himmelblaud(8), himmelblaud-tasks(8) β go read those too, they're part of the lore π«Ά
π AUTHOR
David Mulder <dmulder@himmelblau-idm.org>, <dmulder@samba.org> β shoutout to the main character who wrote all this π
That's the whole page, bestie! This is aad-tool from the 2025-10-31 release of the man page β go forth, set your POSIX attrs, and keep that private key in the TPM where it belongs. πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: himmelblau 2.3.14+git0.e23b4c54-160000.1.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: himmelblau 2.3.14+git0.e23b4c54-160000.1.2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms