[SOLVED] Can not delete fleet enrollement tokens

Hello

I want to delete Fleet Server enrollment tokens that are no longer used but that I can no longer delete

I tested the following process:

but it does not work

I found something else that talks about passing
"allow_restricted_indices": on true

which I did but I still have an error I do not understand :frowning:

  "index": ".fleet-enrollment-api-keys-7",
  "id": "38274990-xxxxx-xxxx-xxxxx-175a3af94b89",
  "cause": {
    "type": "security_exception",
    "reason": "action [indices:data/write/bulk[s]] is unauthorized for user [system_user] with effective roles [superuser,systemindices_superuser] on restricted indices [.fleet-enrollment-api-keys-7], this action is granted by the index privileges [create_doc,create,delete,index,write,all]"
  },
  "status": 403
},

Please help
Thanks

EDIT:
I found it :slight_smile:
I added .fleet-enrollment-api-keys-7
in my role with "allow_restricted_indices": on true

and it worked, I was able to delete the tokens :slight_smile: