Skip to content

Bug report: Missing headers in yammer search #4049

@MathijsVerbeeck

Description

@MathijsVerbeeck

Description

While executing the command yammer search for the issue #3928 I noticed that I kept getting an error '401 Unauthorized'.
image
When executing the code using --debug, I noticed that my bearer token was not being passed with the request that was being sent.
After looking in the code, I noticed that the headers were missing from the AxiosRequestConfig. After adding the following headers:

  • accept: 'application/json;odata.metadata=none'
  • content-type': 'application/json;odata=nometadata'
    the call started to work.

Steps to reproduce

  1. Execute m365 yammer search --querytext '{Value you'd like to search on}'

Expected results

A list of results

Actual results

401 Unauthorized

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions