When calling Get-MgUser in PS I get the following error: Get-MgUser_List: Expected comma, literal, or object. Was Eof: .

Arvind Narayanan 0 Reputation points
2024-01-24T07:02:46.7966667+00:00

Screenshot 2024-01-24 at 1.02.12 AM

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,891 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 34,616 Reputation points
    2024-01-24T08:16:04.73+00:00

    Hi @Arvind Narayanan

    I can reproduce your error.

    User's image Do not attempt to call this API using a personal or guest account, it is only supported for work/school accounts.

    User's image Please run the Disconnect-MgGraph command to log out the current user, then run the Connect-MgGraph command and log in using your work account.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.