Skip to content

yammer user get

Retrieves the current user or searches for a user by ID or e-mail


m365 yammer user get [options]


-i, --userId [userId]
Retrieve a user by ID
--email [email]
Retrieve a user by e-mail
-h, --help
output usage information
--query [query]
JMESPath query string. See for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
Runs command with verbose logging
Runs command with debug logging



In order to use this command, you need to grant the Azure AD application used by the CLI for Microsoft 365 the permission to the Yammer API. To do this, execute the cli consent --service yammer command.

All operations return a single user object. Operations executed with the email parameter return an array of user objects.


Returns the current user

m365 yammer user get

Returns the user with the ID 1496550697

m365 yammer user get --userId 1496550697

Returns an array of users matching the e-mail

m365 yammer user get --email

Returns an array of users matching the e-mail in JSON. The JSON output returns a full user object

m365 yammer user get --email --output json