Forum Discussion
List external users and their status
Thanks Aljohn
This gives me a list of all guest users. What I need is a list of only those guest users that have not yet accepted the invitation. Is that possible?
/Jakob
You can check this article as it explains managing access requests and guest users with pending invitation.
- Karen GlynnOct 01, 2018Copper Contributor
Thjat doesn't really cut it. I need to see which guest users have activated their accounts, not look for invitations etc.
- Kyle BurnsMar 25, 2020Copper Contributor
This is an old thread, but I needed to solve the same problem today and figured it would be good since I came across this thread looking for a solution to document what I came up with here. Hopefully it will be helpful for the next person. I used the Azure CLI and queried the userState property to identify guest accounts that had not had accepted the invitation. Here is the command I used:
az ad user list --query "[?userState == 'PendingAcceptance'].{userType:userType, surname:surname, givenName:givenName, department:department, userState:userState}" --output table