Alexandr Sulimov
Alexandr Sulimov

Reputation: 1924

VSTS all time integration

I have a web-site with users "site-account".

Users also are registered in VSTS / (project1.visualstudio.com, project2.visualstudio.com, ...) "vsts-account"

I need allow user once link a "site-account" to "vsts-account" (one or multiple)

After link a account i can read / write a Work-Backlog item in any time. Example, in background read Work-Backlog and send email notification.

I cant understand how i can link and grand access to "vsts-account" from "site-account"

I can create a Extension, that will be installed in VSTS.

Thanks for any links

Upvotes: 0

Views: 46

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33708

The simple workflow:

  1. Create a web app with OAuth authorize, refer to this article: ASP.NET web app (OAuth sample)
  2. The user login your web-site with "site-account"
  3. After login, enable the link (e.g. vsts-account), the user can click the link to authorization to the VSTS
  4. Associate the access token and refresh token to that user (store in database)
  5. Using refresh token to get access token if the access token expired
  6. Using access token to get work item in VSTS

More information about OAuth with VSTS, you can refer to Authorize access to REST APIs with OAuth 2.0

Upvotes: 1

Related Questions