Use az rest with access token
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Related command**
`az rest`
**Is your feature request related to a problem? Please describe.**
I want to change the merge strategy of a pull request with `az repos pr update`. But it does not support this. Therefore I wanted to use `az rest` from an azure pipeline, but I have no means of authorizating without an azure subscription.
**Describe the solution you'd like**
I would want to be able to do something like:
`az rest -m patch -b --azure-pat $(System.AccessToken) -u `
**Describe alternatives you've considered**
The following does not work either:
```sh
az rest \
-m patch \
-b '{"completionOptions":{"mergeStrategy":"rebaseMerge"}}' \
-u https://dev.azure.com///apis_/git/repositories/pullrequests/?api-version=7.0 \
--skip-authorization-header \
--headers "Authorization=Bearer $(System.AccessToken)" "Content-Type=application/json"; \
```
and returns
`ERROR: Not Found({"error":{"code":"MissingSubscription","message":"The request did not have a subscription or a valid tenant level resource provider."}})`
Contributor guide
Assessment
This issue has not been assessed yet.