Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Access Reviews Documentation Powershell Formatting Error #2847

Open
aelliott101 opened this issue Jul 12, 2024 · 0 comments
Open
Labels
area:documentation Focused on documentation of the product type:bug A broken experience

Comments

@aelliott101
Copy link

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_
@aelliott101 aelliott101 added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jul 12, 2024
@timayabi2020 timayabi2020 added area:documentation Focused on documentation of the product and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:documentation Focused on documentation of the product type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants