How to add a condition for an array on an entity query for a config entity?
A config entity doesn't use a normalized table structure, so the normal array conditions which use JOIN don't work. Instead do a condition on property.*:

$query = \Drupal::entityTypeManager()-&gt;getStorage('user_role')-&gt;getQuery();
$query-&gt;condition('permissions.*', 'administer nodes');
$query-&gt;execute();