File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,21 @@ from vsts.vss_connection import VssConnection
18
18
from msrest.authentication import BasicAuthentication
19
19
import pprint
20
20
21
- token= ' REDACTED'
22
- team_instance= ' https://REDACTED.visualstudio.com'
21
+ # Fill in with your personal access token and org URL
22
+ personal_access_token = ' YOURPAT'
23
+ organization_url = ' https://dev.azure.com/YOURORG'
23
24
24
- credentials = BasicAuthentication(' ' , token)
25
- connection = VssConnection(base_url = team_instance, creds = credentials)
25
+ # Create a connection to the org
26
+ credentials = BasicAuthentication(' ' , personal_access_token)
27
+ connection = VssConnection(base_url = organization_url, creds = credentials)
28
+
29
+ # Get a client (the "core" client provides access to projects, teams, etc)
26
30
core_client = connection.get_client(' vsts.core.v4_0.core_client.CoreClient' )
27
31
28
- team_projects = core_client.get_projects()
32
+ # Get the list of projects in the org
33
+ projects = core_client.get_projects()
29
34
35
+ # Show details about each project in the console
30
36
for project in team_projects:
31
37
pprint.pprint(project.__dict__ )
32
38
```
You can’t perform that action at this time.
0 commit comments