No permissions for [indices:admin/mapping/put]

Hi everyone,
We are seeing an issue where users we create are not able to insert the first document in an index or a datastream, we are getting the following error:

{
“error” : {
“root_cause” : [
{
“type” : “security_exception”,
“reason” : “no permissions for [indices:admin/mapping/put] and User [name=, backend_roles=, requestedTenant=null]”
}
],
“type” : “security_exception”,
“reason” : “no permissions for [indices:admin/mapping/put] and User [name=, backend_roles=, requestedTenant=null]”
},
“status” : 403
}

We are handling users and roles using yaml files, we have tried adding ‘indices:admin/mapping/put’ in allowed_actions sections in roles.yml in the role user is mapped to, we even tried using default action groups - crud, create_index, crud&create_index together and we even added unlimited in allowed_actions section but still no luck.
We even tried adding allowed actions one by one upon getting errors we were able to add some actions but looks like we are unable to add indices:admin/mapping/put.
We added * in allowed_actions are still getting the same error.

Adding * in index patterns seems to be working but we dont want to do that we want user to have permissions only to a set of indices
could someone please help us, thanks!

@karthik Please share your config.yml file, roles.yml and roles_mapping.yml.