pnp / pnp/cli-microsoft365

[Bug] Without the required scope errors returned from 'tenant people profilecardproperty' commands are vague

Open
#5,629 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
TypeScript
Stars
1.5k
Forks
413
Avg merge
5d 6h
Merged PRs (30d)
21

Description

I don't have the required scope added yet to my app reg but the error returned is a bit vague:

image

That's probably because the error object coming in from the Graph has an empty message. :(
image
not sure how to solve this here... The MS Graph team should make this more descriptive, or we should implement checks based on the HTTP status code.. But that seems a change that would impact a lot of other code.

Originally posted by @martinlingstuyl in https://github.com/pnp/cli-microsoft365/issues/5624#issuecomment-1791486402

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tenant people profilecardproperty commands and inspect how an empty Microsoft Graph error message is surfaced. Determine a consistent, actionable message for missing required scopes without assuming a broader error-handling change; done means the affected commands no longer return a vague error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.