mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore: added notes about m365 cli
This commit is contained in:
67
knowledge base/m365.md
Normal file
67
knowledge base/m365.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# `m365`
|
||||
|
||||
CLI tool for Microsoft 365.
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [TL:DR](#tldr)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL:DR
|
||||
|
||||
```sh
|
||||
# Installation.
|
||||
npm install -g '@pnp/cli-microsoft365'
|
||||
yarn global add '@pnp/cli-microsoft365'
|
||||
docker run --rm -it 'm365pnp/cli-microsoft365':'latest'
|
||||
|
||||
# Disable telemetry.
|
||||
m365 cli config set -k 'disableTelemetry' -v 'true'
|
||||
|
||||
# Login to Microsoft 365.
|
||||
m365 login -t 'browser'
|
||||
m365 login --authType 'password' \
|
||||
--userName 'user@contoso.com' --password 'pass@word1'
|
||||
m365 login --authType 'certificate' \
|
||||
--certificateFile 'path/to/cert.pfx' --password 'pass@word1'
|
||||
|
||||
# Check the current login status.
|
||||
m365 status
|
||||
|
||||
# Send messages to a chat in Teams.
|
||||
# Specify *only one* of 'chatId', 'chatName' or 'userEmails'.
|
||||
m365 teams chat message send --chatId 'chat-uuid' -m 'hello world'
|
||||
m365 teams chat message send --chatName 'chat-display-name' -m 'hello world'
|
||||
m365 teams chat message send -e 'user-email-1,…,user-email-N' -m 'hello world'
|
||||
m365 teams chat message send … -m 'hello <b>world</b>'
|
||||
|
||||
# Send messages to a channel in Teams.
|
||||
m365 teams message send -t 'team-uuid' -c 'channel-uuid' -m 'hello world'
|
||||
m365 teams message send … -m 'hello <b>world</b>'
|
||||
|
||||
# Logout.
|
||||
m365 logout
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [Website]
|
||||
- [Github]
|
||||
- [node.js]
|
||||
- [`npm`][npm]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
<!-- project's references -->
|
||||
[github]: https://github.com/pnp/cli-microsoft365
|
||||
[website]: https://pnp.github.io/cli-microsoft365/
|
||||
|
||||
<!-- internal references -->
|
||||
[further readings]: #further-readings
|
||||
[node.js]: node.js.md
|
||||
[npm]: npm.md
|
||||
|
||||
<!-- external references -->
|
||||
34
knowledge base/node.js.md
Normal file
34
knowledge base/node.js.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Node.js
|
||||
|
||||
Open-source, cross-platform JavaScript runtime environment.
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [TL:DR](#tldr)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL:DR
|
||||
|
||||
```sh
|
||||
# Use a custom CA certificate.
|
||||
export NODE_EXTRA_CA_CERTS='path/to/trusted/ca/cert.pem'
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [Website]
|
||||
- [`npm`][npm]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
<!-- project's references -->
|
||||
[website]: https://nodejs.org/en
|
||||
|
||||
<!-- internal references -->
|
||||
[further readings]: #further-readings
|
||||
[npm]: npm.md
|
||||
|
||||
<!-- external references -->
|
||||
42
knowledge base/npm.md
Normal file
42
knowledge base/npm.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Node Package Manager CLI
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [TL:DR](#tldr)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL:DR
|
||||
|
||||
```sh
|
||||
# Disable SSL verification.
|
||||
npm config set 'strict-ssl'='false'
|
||||
|
||||
# Use a custom CA certificate.
|
||||
npm config set 'cafile'='path/to/ca/cert.pem'
|
||||
|
||||
# Install packages.
|
||||
npm install '@pnp/cli-microsoft365'
|
||||
npm install -g '@pnp/cli-microsoft365@latest'
|
||||
|
||||
# Remove packages.
|
||||
npm uninstall '@pnp/cli-microsoft365'
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- Official [documentation]
|
||||
- [node.js]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
<!-- project's references -->
|
||||
[documentation]: https://docs.npmjs.com/cli/
|
||||
|
||||
<!-- internal references -->
|
||||
[further readings]: #further-readings
|
||||
[node.js]: node.js.md
|
||||
|
||||
<!-- external references -->
|
||||
Reference in New Issue
Block a user