Keycloak Rest API - Bug with IDP Mapper Creation

I am trying to use REST API for the most common use cases we have.
I have been able to do a lot ( creating client roles / mappers … ) , but i am struggling with Identity Provider Mapper creation.

I am using Curl with bash scripting for all our Keycloak Rest API and it works just fine.
My issue is the curl for the IDP mapper creation returns a HTTP/1.1 201 Created, but the interface does not show my new mapper. The only way i am seeing it, is by using the mapper ID returned by the curl Command in the admin URL ( )

I cannot also list it in Rest API mode, neither delete it. I can only change values inside this mapper.
Any advice why is that happening?
Using Keycloak 18.0.2.

In case more data needed.
Here is how iam creating the mapper :

  curl  --noproxy '*' -k -v  -X POST "$KEYCLOAK_URL/admin/realms/$KEYCLOAK_REALM/identity-provider/instances/myidp/mappers" \
  -H "Content-Type: application/json" \
  -H "Authorization: bearer $mastertoken" \
  --data  "$(generate_post_data)"

# Inside data : 

    "identityProviderAlias": "$idpalias",
    "identityProviderMapper": "oidc-role-idp-mapper",
    "config": {
     "syncMode": "FORCE",
     "claim": "groups",
     "role": "$role",
     "claim.value": "$claimvalue"

the return of the curl :

* upload completely sent off: 324 out of 324 bytes
< HTTP/1.1 201 Created
< Referrer-Policy: no-referrer
< X-Frame-Options: SAMEORIGIN
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Location: https://mykeycloak/admin/realms/realm/identity-provider/instances/myidp/mappers/0130c001-9ca8-47bb-9a4f-170d56ff8c37
< content-length: 0

If you suspect a bug the issue tracker on github is most likely the best place.
Here it is mostly users helping other users on how to do things, the devs are more on github.

1 Like

You’re right.
This is a bug. i’ll post it on github thank you.
For the record, the issue is that the idp alias exists but not in the same realm ( it should not work since this IDP does not exist in the realm iam working on ). Probably a missmutch on database search or something like that.
I’ll close the Topic for now.