Add initial implementation of DevOps client and harvester script

This commit is contained in:
2025-11-01 18:48:09 +01:00
parent 614723f998
commit 7243c0433f
3 changed files with 41 additions and 0 deletions

14
harvester.py Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python3
from devops import Client, DEVOPS_SCOPE
from azure.identity import DefaultAzureCredential
from json import dumps
def main():
token = DefaultAzureCredential().get_token(DEVOPS_SCOPE).token
client = Client("https://dev.azure.com/mcovsandbox/", token)
projects = client.get_projects()
print(dumps(projects, indent=2))
if __name__ == "__main__":
main()