Comments (12)
@abettadapur Just to add on, if you want to retrieve your id, you can use the connectionData api https://app.vssps.visualstudio.com/_apis/ConnectionData, to get your id, and then called the https://app.vssps.visualstudio.com/_apis/accounts?ownerId={ownerId}&api-version={api-version}, to find the accounts associated with the id. This is the recommended way to use List Accounts API, as you will get the concise account object in response.
from vsts-rest-api-specs.
Using https://app.vssps.visualstudio.com I do get a 400 response saying "Necessary parameters ownerId or memberId were not provided in the request." Now I wonder how can I retrieve my member Id through the REST Api in order to construct this request?
from vsts-rest-api-specs.
@PiyushGuptaMSFT Additionally, I cannot use my PAT to call this API. The same PAT works correctly on the other account scoped APIs
from vsts-rest-api-specs.
Thank you for your feedback. We're actively working on a fix for this now.
from vsts-rest-api-specs.
@abettadapur To unblock you until the docs get updated, the correct host is
https://app.vssps.visualstudio.com
rather than https://{accountName}.visualstudio.com
from vsts-rest-api-specs.
@abettadapur Apologies for the inconvenience caused to you. Are you using https://app.vssps.visualstudio.com/_apis/accounts? The correct URI is https://app.vssps.visualstudio.com/_apis/accounts, however if you still getting an error using this, then please let us know.
from vsts-rest-api-specs.
Yes that API is working for me, thanks
from vsts-rest-api-specs.
@abettadapur Currently, PAT creation is scoped to accounts, and hence it is not possible to call an deployment level API via PAT.
from vsts-rest-api-specs.
I can call "_apis/ConnectionData" and pass the PAT for success. However, no matter what I do when I call "_apis/accounts" it ALWAYS returns 401 Unauthorized... Is the API broken?
FYI, I'm using Postman right now to do the calls. Will write code once I get the right calls working...
from vsts-rest-api-specs.
@abettadapur Currently, PAT creation is scoped to accounts, and hence it is not possible to call an deployment level API via PAT.
How can we make an API call to get a list of the Accounts / Organizations the current user has access to in Azure DevOps, if the PAT wont work with "_apis/accounts"??
from vsts-rest-api-specs.
Using https://app.vssps.visualstudio.com/_apis/accounts
I get the "Necessary parameters ownerId or memberId were not provided in the request."
response. I am using an OAuth token. I am using version 5.0 of the AzureDevops REST API.
from vsts-rest-api-specs.
@PiyushGuptaMSFT any news on this?
Request https://app.vssps.visualstudio.com/_apis/accounts?api-version=7.2-preview
still returns
{
"$id": "1",
"innerException": null,
"message": "Necessary parameters ownerId or memberId were not provided in the request.",
"typeName": "Microsoft.VisualStudio.Services.Account.AccountException, Microsoft.VisualStudio.Services.WebApi",
"typeKey": "AccountException",
"errorCode": 0,
"eventId": 4236
}
from vsts-rest-api-specs.
Related Issues (20)
- Improve Documentation HOT 5
- Broken link
- Unhelpful error messages
- Iteration creation as per example returns 404
- Sample request seems to be wrong, as both cases have same url
- Not enough details to add additional provenance data to universal package
- Graph Users Create "Request Body" section incorect
- Typo "a Azure DevOps"→"an Azure DevOps"
- Typo "a Azure DevOps"→"an Azure DevOps"
- Typo "a Azure DevOps"→"an Azure DevOps"
- GIT policy configurations does not return any values
- Team Name missing in URL of the teamfieldvalues examples
- Rest api - Is it possible to get stage info included?
- No mention of arrays
- List items API doesn't return the Author's ImageUrl property
- Get a repository by remote URL example misleadingly broken.
- Dead URL on Azure DevOps Services REST API Reference HOT 1
- Filter build on repositoryId or repositoryType fail with Bad Request
- Update document for ConvertAuthenticationScheme
- Unable to create dashboard with example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vsts-rest-api-specs.