Azure DevOps
What it does
Section titled “What it does”Azure DevOps is where LeanPortfolio reads its data: work items and queries for roadmaps, burndowns and metrics, and pull requests for delivery analytics. You connect your organization once, with a Personal Access Token (PAT) of your own that can only read. LeanPortfolio never writes to Azure DevOps.
Step by step
Section titled “Step by step”-
Open the Azure DevOps tab. In LeanPortfolio, go to Settings → Datasource and open the Azure DevOps tab (
/settings/datasource?tab=azure). The card is titled Azure DevOps configuration and shows Not connected until you connect. -
Enter your organization URL. In Organization URL, type the address of your organization, for example:
https://dev.azure.com/northwind-mobility/The older
https://northwind-mobility.visualstudio.comform works too. -
Create a read-only PAT in Azure DevOps. In Azure DevOps, open User settings → Personal access tokens and create a new token (Microsoft’s guide):
-
Organization: the same one as in step 2.
-
Scopes: choose Custom defined and select only these two:
Scope Permission What LeanPortfolio reads with it Work Items Read ( vso.work)work items and queries: roadmap, burndown, metrics Code Read ( vso.code)pull requests, their threads, reviewers and votes
Never grant Write or Manage on any scope. Azure DevOps has no separate pull-request scope: reading pull requests, comments and votes all falls under Code → Read.
Copy the token when Azure DevOps shows it: it is shown only once.
-
-
Paste the PAT and connect. Paste the token into Personal Access Token (PAT) and press Connect. The button reads Connecting… while LeanPortfolio tests the token against Azure DevOps. When the test passes:
- a message confirms Azure DevOps connection tested successfully;
- the badge changes to Connected;
- the PAT field is emptied and marked Saved, with the note The PAT is stored encrypted and never shown again. LeanPortfolio keeps the token encrypted and never sends it back to the browser, so the field stays empty from now on.
-
Choose a default project and save. Once connected, Default project appears below, with the number of projects your token can see (for example 12 projects available). Open Select a project…, pick one (for example
Northwind) and press Save configuration. A message confirms Default project saved successfully.The default project is preselected when you create a roadmap or a burndown, and in the project filter of the delivery and metrics views, until you choose another one there.
To use a new token later, for example when the old one expires, paste it into the same field and press Connect again.
Why read-only?
Section titled “Why read-only?”LeanPortfolio never writes to Azure DevOps: no work items, no comments, no votes, no pull request reviews. This is a requirement, and it is enforced twice:
- By the token. The PAT above only has read scopes, so it cannot write even if the code tried.
- By the client. LeanPortfolio’s Azure DevOps client refuses every request that is not a read
(the WIQL query endpoint is the only
POSTit allows), and any change that adds a write is rejected in review.
LeanPortfolio does not read the rich text of a work item either (its description, acceptance criteria, repro steps or history). The one exception is importing work items into Context, which is optional and off by default.
Each user connects with their own token, stored encrypted, so there are no shared credentials.
Troubleshooting
Section titled “Troubleshooting”The first three messages come from the server and appear in English whatever the language of the app.
“Invalid Azure DevOps credentials”
Section titled ““Invalid Azure DevOps credentials””Azure DevOps rejected the token. On a first connection the badge stays Not connected. If you were already connected, the rejected token has replaced the one that worked and the connection is marked as failed, but the badge may keep showing Connected until LeanPortfolio reads the connection again: reload the page to see the real state.
Check that the token:
- is copied whole, and has not expired or been revoked;
- was created for the organization in Organization URL;
- has the two scopes in step 3.
Create a new token if in doubt, paste it and press Connect again.
“Couldn’t reach Azure DevOps, try again”
Section titled ““Couldn’t reach Azure DevOps, try again””LeanPortfolio got no usable answer from Azure DevOps: a network error, a timeout or an outage on their side. The URL and token you typed are kept. Check that the organization name in Organization URL is spelled right and press Connect again in a few minutes.
“Invalid organization URL”
Section titled ““Invalid organization URL””The address is neither https://dev.azure.com/<organization> nor
https://<organization>.visualstudio.com. Nothing is saved: correct it as in step 2.
“0 projects available”
Section titled ““0 projects available””The token works, but the account that created it cannot see any project in that organization. Ask an administrator of the organization to add you to the project, then reload the page: LeanPortfolio reads the list from Azure DevOps again.
The tab shows “Error” and a “Retry” button
Section titled “The tab shows “Error” and a “Retry” button”LeanPortfolio could not load your saved connection. Press Retry. If it keeps failing, the LeanPortfolio backend is not answering: check that the stack is running.

