2

Question on your VSTS integration

Hi,

I am a developer working in VSTS for Microsoft. In CatLight's integration with VSTS, does it make a call to the following REST API to get a list of a user's VSTS accounts?

https://www.visualstudio.com/en-us/docs/integrate/api/shared/accounts

And if so, which fields do you consume? I am assuming just the AccountUri field or both AccountUri and AccountName.

 

Also, I was going through CatLight's initial start experience, and it seemed to me that you are able to figure out the VSTS account that I am currently signed into, but it's not clear to me how you pick one particular account since my user identity could be signed into multiple VSTS accounts. If you could explain that too, it would be much appreciated.

Oh, and great product and integration! :)

 

Thanks,

Abhijeet Pareek (Microsoft)

1 reply

Hi Abhijeet,

When connecting to VSTS, user provides an url of the specific account, like https://bobSmith.visualstudio.com . We extract the expected account name from that url, as it currently has a form of [accountName].visualstudio.com. 

After user completes authentication, we go to  https://app.vssps.visualstudio.com/_apis/profile/profiles/me?api-version=1.0 to get the id of the user.

Then we go to https://app.vssps.visualstudio.com/_apis/Accounts?memberId=[id] to get a list of available accounts. We use only AccountName and AccountId fields from that request. 

We pick one account that matches the expected account name and then we use id of this account internally in the app.

A

Thanks for the prompt response, and the information. It's very helpful.

We are considering/planning some changes on this REST API, and want to check with you if our proposed changes will impact your app.

Some background:VSTS is planning a new feature, where VSTS Account will be synonymous with the Project Collection, and therefore we wanted to make the VSTS Account Id equal to the Project Collection Id. This brings our hosted implementation closer to our on-prem implementation and hopefully it will be easier for developers in the long term. Having said that, we don't want to break any existing integrations, so I wanted to reach out to assess the potential impact.

So let's say we changed the value of the 'AccountId' field to a different GUID value (equal to the Project Collection Id). Will it cause any issues with your integration?

Also, if possible may be we can switch communication to email instead. My email is abpareek followed by @micrsosoft.com

 

Thanks,

Abhijeet

Replied by email.