Create Indentity Provider Mapper From Command Line

Hello All,

I am trying to configure a Identity Provider Mapper through the CLI command line on windows for an Azure Ad Identity Provider

I can create this from the GUI, but i really do not know where to start to create this from command line. I am using the CLI to automate the installation of keycloak to different ci environments

kcadm.bat get identity-provider/instances/ms-azure-ad/mappers -r mydomain

[ {
“id” : “69b--------------------------------”,
“name” : “username”,
“identityProviderAlias” : “ms-azure-ad”,
“identityProviderMapper” : “oidc-username-idp-mapper”,
“config” : {
“template” : “${CLAIM.upn}”
} ]

kcadm.bat create identity-provider/instances/ms-azure-ad/mappers -r energyx -s name=username -s identityProviderAlias=ms-azure-ad -s identityProviderMapper=oidc-username-idp-mapper -s config.template=${CLAIM.upn}

1 Like