'search_phase_execution_exception', 'action [indices:data/read/search[phase/query]] is unauthorized for user

i use a script in python to search, index and uptade data and everything works but sometimes give this error many times in a row **'search_phase_execution_exception', 'action [indices:data/read/search[phase/query]] is unauthorized for user **

this is de role information

{
  "organizer" : {
    "cluster" : [
      "all"
    ],
    "indices" : [
      {
        "names" : [
          "data-report*"
        ],
        "privileges" : [
          "all"
        ],
        "allow_restricted_indices" : false
      }
    ],
    "applications" : [ ],
    "run_as" : [ ],
    "metadata" : { },
    "transient_metadata" : {
      "enabled" : true
    }
  }
}

`

Hey there @sair_ramos, welcome to the community! :wave:

Can you verify that your script is only performing actions against the specified data-report* Elasticsearch index pattern? If you happen to be using a more inclusive index pattern like data-* in your scripts/queries that could result in the error you're seeing as the user may not have access to the other indices.

Of course you could change data-report* -> * within your role, thereby granting access to all indices, but better to identify exactly what indices you're querying in your script and add the necessary privileges to those as well to ensure you're not modifying data you're not expecting to.

Hope this helps -- cheers!
Garrett