# Identity Provider Mapper - Advanced Claim to Role - Python Keycloak REST API

**URL:** <https://forum.keycloak.org/t/identity-provider-mapper-advanced-claim-to-role-python-keycloak-rest-api/20814>\
**Category:** Configuring the server\
**Created:** [March 13, 2023, 11:29pm UTC](https://forum.keycloak.org/t/identity-provider-mapper-advanced-claim-to-role-python-keycloak-rest-api/20814 "2023-03-13T23:29:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alansonsci](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/alansonsci/32/7609_2.png) [@alansonsci](https://forum.keycloak.org/u/alansonsci)\
**Post date:** [March 13, 2023, 11:29pm UTC](https://forum.keycloak.org/t/identity-provider-mapper-advanced-claim-to-role-python-keycloak-rest-api/20814/1 "2023-03-13T23:29:50Z")

</div>

I am working on a Python script to add an Advanced Claim to Role Identity Provider Mapper in Keycloak. I have an example of a script and tried modifying it but when I post my values I am not getting the result expected as there seems to be no error message but it’s just missing data from my payload for example enabling regex and the key and value are missing

Original working script using “identityProviderMapper”: “oidc-role-idp-mapper”

> **[import requestsimport jsonimport boto3# Set up variables for Keycloak se -...](https://pastebin.com/GbjjU3Nt)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

My script trying to use “identityProviderMapper”: “oidc-advanced-role-idp-mapper”,

> **[import requestsimport jsonimport boto3# Set up variables for Keycloak se -...](https://pastebin.com/aCNBEU7B)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

How can I see what are accepted values for the mapper payload for oidc-advanced-role-idp-mapper
