-
Notifications
You must be signed in to change notification settings - Fork 97
Vso Subscription Apis
Suwat Ch edited this page Jan 14, 2016
·
4 revisions
ARMClient.exe get "https://app.vssps.visualstudio.com/_apis/Commerce/Subscription?providerNamespaceId=VisualStudioOnline&queryOnlyOwnerAccounts=false&inlcudeDisabledAccounts=false&includeMSAAccounts=true"
NOTE: the memberId is available via X-VSS-UserData
response header (for instance, <memberId>
:<email>
).
ARMClient.exe get "https://app.vssps.visualstudio.com/_apis/Commerce/Subscription?providerNamespaceId=VisualStudioOnline&queryOnlyOwnerAccounts=false&inlcudeDisabledAccounts=false&includeMSAAccounts=true&memberId=%memberId%"
Below is excerpt from the response.
{
"accountName": "<vsoAccountName>",
"subscriptionId": "<subscriptionId>", // if null, it meant the account is not linked with any subscription
"subscriptionStatus": "active", // whether or not the subscription is active
"resourceGroupName": "<resourceGroup>",
"geoLocation": "<location>",
"accountTenantId": "<aadTenantId>", // Guid.Empty indicates this account owned by non AAD-backed MSA account.
"isAccountOwner": true, // whether or not the user is the owner of the account
}
NOTE: For VSO account owned by non AAD-backed MSA account, when using VSO api such as List Repositories, one must pass additional request header X-VSS-ForceMsaPassThrough: true
. Vice versa, the header must not
be passed for AAD-backed MSA account.