// This file is autogenerated, DO NOT EDIT
// security/authentication/oidc-guide.asciidoc:470

[source, python]
----
resp = client.security.put_role_mapping(
    name="oidc-finance",
    roles=[
        "finance_data"
    ],
    enabled=True,
    rules={
        "all": [
            {
                "field": {
                    "realm.name": "oidc1"
                }
            },
            {
                "field": {
                    "groups": "finance-team"
                }
            }
        ]
    },
)
print(resp)
----
