Skip to main content

Microsoft Entra ID

Connection

Setup

1

Register an application

Register an app for Klef in your tenant, then add a client secret to it.
2

Grant the permissions

Add the Microsoft Graph application permissions under Permissions and grant admin consent for the tenant.
3

Add Exchange access

Only needed to manage address list visibility and mail forwarding. Give the app the Exchange.ManageAsApp role and a certificate to sign in to Exchange Online with.

Permissions

Grant each as an application permission, with admin consent. Klef needs these Microsoft Graph permissions:
  • User.ReadWrite.All (or Directory.ReadWrite.All) to read and write users.
  • User.EnableDisableAccount.All (or User.ReadWrite.All) to enable and disable accounts.
  • GroupMember.ReadWrite.All (or Group.ReadWrite.All) to manage group membership.
  • Organization.Read.All (or LicenseAssignment.Read.All, or Directory.Read.All) to read the tenant’s licenses.
  • User-PasswordProfile.ReadWrite.All to reset passwords.
These are optional:
  • User-Phone.ReadWrite.All (or User.ReadWrite.All) to update phone numbers.
  • RoleManagement.ReadWrite.Directory to assign directory roles. It lets the app assign any role, Global Administrator included, so grant it only where Klef manages roles.
  • LicenseAssignment.ReadWrite.All (or Group.ReadWrite.All) to assign licenses to groups.
  • Domain.Read.All (or Directory.Read.All) to turn away a user in a federated domain before Graph does.
  • UserAuthenticationMethod.ReadWrite.All and Policy.Read.All to issue Temporary Access Passes. Both are required when First sign-in is set to Temporary Access Pass, which the authentication methods policy must also allow.
  • Exchange.ManageAsApp, with an Entra role such as Exchange Administrator on the app’s service principal, to manage address list visibility and mail forwarding. It applies only when the connection has Exchange settings.

Settings

microsoft_entra.user

Fields

Credential: password

Password. A password { } block in a target issues it.

Credential: temporary_access_pass

Temporary Access Pass. A temporary_access_pass { } block in a target issues it, and status = removed inside it revokes it.

Default Account Matching Rules

When Klef adopts an account that already exists in Microsoft Entra ID, it works out whose it is by trying these in order. A connection can override them.

Examples

Employee lifecycle

Stage a Microsoft account before day one, switch on Microsoft 365 and Slack when they start, and shut both down when they leave.

Engineering access

The engineering group, a seat on the GitHub engineering team and the incident channels, with GitHub removed when they leave.

Contractor access

Unlicensed Microsoft, Slack and AWS access for contractors that expires on their end date, with a warning to their manager first.

Leaver offboarding

Ask the manager to plan the handover, then close Microsoft, Slack and GitHub access on the last day and tell security.

Oracle HCM worker provisioning

An Entra mailbox and a nested Oracle Fusion employment record across five stages, with a worker’s assignments expanded one for one.