Microsoft Access Reviews Documentation Powershell Formatting Error

Aperta
#2,847 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@timayabi2020 ci sta già lavorando.

Dal 13/2/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

area:documentation type:bug
Describe the bug

Access Review api examples have a incorrect formatting when translated into powershell scripts. Single quotations are translated into the wrong encoding causing requests to fail without good user feedback. This is an issue with any occurrence of single quotes, but was realized with the query scope field here: https://learn.microsoft.com/en-us/graph/api/accessreviewset-post-historydefinitions?view=graph-rest-1.0&tabs=powershell

For example, this scope provided in the example gives error
query = "/identityGovernance/accessReviews/definitions?$filter=contains(scope/query, '/groups')"

This is the correct formatting
query = '/identityGovernance/accessReviews/definitions?$filter=contains(scope/query, ''/groups'')'

Note the two differences are surrounding the property in single quotes instead of double, and escaping each single quote in the property with another single quote.

These scopes are used through access reviews apis, and it would be ideal to fix it across the board.

Expected behavior

I expect users to be able to use given examples from documentation.

How to reproduce

Using Microsoft graph powershell SDK, submit an access review history report request here: https://learn.microsoft.com/en-us/graph/api/accessreviewset-post-historydefinitions?view=graph-rest-1.0&tabs=powershell. This will return 400, and network traces show the single quotations converted into \u0027. However the 400 response does not give any helpful user feedback.

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

Users must manuall change powershell example. However most customers do not know to do this

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
Lingua principale
C#
Stelle
898
Fork
230
Merge medio
2g 5h
PR unite (30g)
31

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoftgraph/msgraph-sdk-powershell

Tutte le issue di microsoftgraph/msgraph-sdk-powershell

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.