title: Powershell Microsoft API get members of eligible roles
body: <p>I'm trying to get all the members of a role (both active assignments and eligible assignments) but i always recive only the active assignments.</p>
  <p>the uri that I used is: <a href="https://graph.microsoft.com/v1.0/directoryRoles/%7BRoleID%7D/members" rel="nofollow noreferrer">https://graph.microsoft.com/v1.0/directoryRoles/{RoleID}/members</a></p>
  <p>the API permissions that I have are:</p>
  <pre><code>AdministrativeUnit.ReadWrite.All
  Application.ReadWrite.OwnedBy
  Directory.AccessAsUser.All
  Directory.Read.All
  Directory.ReadWrite.All
  Group.ReadWrite.All
  GroupMember.ReadWrite.All
  RoleManagement.ReadWrite.Directory
  User.ReadWrite.All
  User.Read
  UserAuthenticationMethod.ReadWrite.All
  Application.ReadWrite.All```
  </code></pre>