Power shell command to extract Users from Teams Admin

Occasional Contributor

Can anyone help? Is there a power shell command that will allow me to get this list:




and extract to excel? Thanks. 

3 Replies



We have several users that are unable to initiate new chats in Teams and cannot join any new teams. The chat issue applies to both 1:1 and 1 to multiple users, and interestingly they have no issues participating in chats they were previously a part of. We have observed that these users do not display in the Users list in the Teams admin center. They do display in Azure AD. We think perhaps their not displaying the Users list might be a clue and would like to be able to cross reference that list with a list of licensed users from Azure AD. Hence our wanting to extract the contents of this specific list.


While each of the scripts you provided are helpful in other ways, they don't generate that specific list. Anyone else have any idea? Thanks. :)


@JoleneHanrahan Hello and thanks for making it more clear. It can probably be done with MS Graph (wild guess) as well but it's not within my field so I'm just gonna leave it there! As per my previous reply I attached the last link as how to view licenses and services as I get the feeling something is incorrect with the licensing part. *edit* (Just noticed I didn't send through all text). But that doesn't explain why some users can use Teams. It sounds a bit like policies involved. Have you viewed all account settings and licenses for a single user experiencing the issue with a user that's not having the issue to see what differs?


Without knowing anything about your environment and config maybe you need to inactivate / reactivate the Teams licenses for your users to make them populate in the Users list in the Teams admin portal. At least I've heard about that "solution" previously. As for the other problem I would at least compare them thoroughly.