Skip to content

Instantly share code, notes, and snippets.

### Requirements: Federated Azure domain, usernames are consistent between Keycloak and Azure AD,
### Microsoft Graph Modules for Powershell.
### Azure domain and Keycloak realm names maybe different.
### Primary source of group and user information is Keycloak.
### Admin login for Keycloak is user-based, admin login for Azure AD is certificate based (app registration).
### $KC_-constants are related to Keycloak, $MG_ are related to Microsoft Graph/Azure AD
### The necessary ImmutableId is generated by converting the LDAP_ID from Keycloak. Your Keycloak
### setup may differ.
# Change Settings here:
$KC_Server = "https://keycloakserver.example.com"