Skip to content

Updates CLI API usage docs. Closes #5699#7231

Open
officialasishkumar wants to merge 2 commits intopnp:mainfrom
officialasishkumar:issue-5699-use-cli-api-docs
Open

Updates CLI API usage docs. Closes #5699#7231
officialasishkumar wants to merge 2 commits intopnp:mainfrom
officialasishkumar:issue-5699-use-cli-api-docs

Conversation

@officialasishkumar
Copy link
Copy Markdown

Closes #5699

Summary

  • Corrects the spo web get API example to use the url option.
  • Adds concise ESM setup guidance for Node.js apps using the CLI API.

Validation

  • npm run build (docs)

@milanholemans
Copy link
Copy Markdown
Contributor

Hi @officialasishkumar, can you please first claim the issue before working on it?
Thanks

@officialasishkumar
Copy link
Copy Markdown
Author

Commented on #5699 now for tracking.

@Adam-it Adam-it self-assigned this May 3, 2026
Copy link
Copy Markdown
Member

@Adam-it Adam-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@officialasishkumar In general, the change is in the right direction, but let's refactor it to be a bit clearer before we merge.

Comment thread docs/docs/user-guide/use-cli-api.mdx Outdated
```sh
node index.js
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, this is what was described in the related issue, but what I think @martinlingstuyl intention was to simply extend the ## Integrate CLI for Microsoft 365 in your app section below with an additional few sentences that would explain that CLI for Microsoft 365 is an ES module and an app that will use it should be ES Module as well. It should also explain to use npm install @pnp/cli-microsoft365 to add the package. Let's also not imply ..."latest", I think mentioning how to install it will be enough, using latest in package.json for any npm package is generally not a safe approach as you may easily end up with a breaking change on the next npm install, so we should rather not recomment this in our docs

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 58a6dbb: moved the ES module and install guidance into the existing integration section and removed the package.json/latest example.

@Adam-it Adam-it marked this pull request as draft May 3, 2026 22:31
@officialasishkumar officialasishkumar force-pushed the issue-5699-use-cli-api-docs branch from 2d77b3f to 58a6dbb Compare May 4, 2026 06:17
@Adam-it Adam-it marked this pull request as ready for review May 6, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update docs on programmatically using CLI

3 participants