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

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