Cli-microsoft365: "m365 outlook mail send" gives error message

Created on 7 Dec 2020  ยท  9Comments  ยท  Source: pnp/cli-microsoft365

Hi,

I've been trying to use the CLI M365 in order to send a message. During the process, I get the following error:

Error: Request failed with status code 400

In order to check if CLI has got necessary permissions, I'm not able to fetch the consent information for any other services except Yammer API.

How do we troubleshoot this kind of error message?

Thanks.

bug work in progress

Most helpful comment

Thanks. It works now. ๐Ÿ˜Š

From: Waldek Mastykarz notifications@github.com
Sent: 09 December 2020 18:24
To: pnp/cli-microsoft365 cli-microsoft365@noreply.github.com
Cc: MOD Administrator admin@M365x996240.OnMicrosoft.com; Author author@noreply.github.com
Subject: Re: [pnp/cli-microsoft365] "m365 outlook mail send" gives error message (#1991)

If you executed npm i @pnp/[email protected] without -g then npm has installed CLI in the C:\Windows\System32 folder rather than as a global tool on your machine. To fix it, execute:

cd c:\windows\system32

remove the local beta

npm un @pnp/cli-microsoft365

install beta globally

npm i -g @pnp/cli-microsoft365@next

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/pnp/cli-microsoft365/issues/1991#issuecomment-741751437, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBAQM7LHXCJJKMZY3UV4NDST5XMVANCNFSM4UQV7LBQ.

All 9 comments

Thanks for reporting the issue and sorry for the trouble. When you execute the command with the --debug option, can you get some more information about the request that's being issued?

I can reproduce the issue and have sufficient information to take it further

I've opened a PR with the fix. We should get it released in the next preview version in the coming days.

Thanks Waldek for your help. ๐Ÿ˜Š

From: Waldek Mastykarz notifications@github.com
Sent: 08 December 2020 00:55
To: pnp/cli-microsoft365 cli-microsoft365@noreply.github.com
Cc: MOD Administrator admin@M365x996240.OnMicrosoft.com; Author author@noreply.github.com
Subject: Re: [pnp/cli-microsoft365] "m365 outlook mail send" gives error message (#1991)

I've opened a PR with the fix. We should get it released in the next preview version in the coming days.

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/pnp/cli-microsoft365/issues/1991#issuecomment-740128370, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBAQM3DUREISQQRGGO6LZTSTUT2PANCNFSM4UQV7LBQ.

We have just release a preview version with the bug fixed. Once again, sorry for the trouble and appreciate you reporting it. If you ever see anything out of the ordinary or have ideas for improvement, please, don't hesitate to reach out to us. ๐Ÿ‘

Hi,

After executing the command to upgrade the version, I still don't see it being upgraded. Is it just me who is not able to upgrade or is it a bug? Am I missing something here?

PS C:\Windows\system32> npm i @pnp/[email protected]

removed 184 packages, and audited 254 packages in 2s

found 0 vulnerabilities
PS C:\Windows\system32> m365 version
(node:8416) Warning: Accessing non-existent property '_theme' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
v3.3.0
PS C:\Windows\system32>

Thanks in advance for your help.

If you executed npm i @pnp/[email protected] without -g then npm has installed CLI in the C:\Windows\System32 folder rather than as a global tool on your machine. To fix it, execute:

cd c:\windows\system32
# remove the local beta
npm un @pnp/cli-microsoft365
# install beta globally
npm i -g @pnp/cli-microsoft365@next

Thanks. It works now. ๐Ÿ˜Š

From: Waldek Mastykarz notifications@github.com
Sent: 09 December 2020 18:24
To: pnp/cli-microsoft365 cli-microsoft365@noreply.github.com
Cc: MOD Administrator admin@M365x996240.OnMicrosoft.com; Author author@noreply.github.com
Subject: Re: [pnp/cli-microsoft365] "m365 outlook mail send" gives error message (#1991)

If you executed npm i @pnp/[email protected] without -g then npm has installed CLI in the C:\Windows\System32 folder rather than as a global tool on your machine. To fix it, execute:

cd c:\windows\system32

remove the local beta

npm un @pnp/cli-microsoft365

install beta globally

npm i -g @pnp/cli-microsoft365@next

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/pnp/cli-microsoft365/issues/1991#issuecomment-741751437, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBAQM7LHXCJJKMZY3UV4NDST5XMVANCNFSM4UQV7LBQ.

Awesome! Thank you for confirming that all is working as intended ๐Ÿ‘

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garrytrinder picture garrytrinder  ยท  3Comments

phillipharding picture phillipharding  ยท  3Comments

garrytrinder picture garrytrinder  ยท  3Comments

plamber picture plamber  ยท  3Comments

aakashbhardwaj619 picture aakashbhardwaj619  ยท  3Comments