Skip to content

yammer search

Returns a list of messages, users, topics and groups that match the specified query.


m365 yammer search [options]


--queryText <queryText>
The query for the search
--show [show]
Specifies the type of data to return when using --output text. Allowed values summary, messages, users, topics, groups.
--limit [limit]
Limits the results returned for each item category.
-h, --help
output usage information
--query [query]
JMESPath query string. See for more information and examples
-o, --output [output]
Output type. json,text. Default text
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.

Using the --show option in JSON output is not supported. To filter JSON results, use either a JMESPath query or filter the data yourself after retrieving them.


Returns search result for the query community

m365 yammer search --queryText "community"

Returns groups that match community

m365 yammer search --queryText "community" --show "groups"

Returns topics that match community

m365 yammer search --queryText "community" --show "topics"

Returns the first 50 users who match the search query

m365 yammer search --queryText "" --show "users" --limit 50

Returns all search results for the query community. Stops at 1000 results.

m365 yammer search --queryText "community" --output json

Returns the search results for the query community and limits the results to the first 50 entries for each result category.

m365 yammer search --queryText "community" --output json --limit 50