azure-devops-rest-api

Azure DevOps Rest Api to get all projects with continuation token

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-14 06:32:53
问题 I'm trying to get a list of all our projects in Azure DevOps with PowerShell using the Azure DevOps Rest Api. However, when I run the script it keeps returning 100 projects. When I add the continuation token it loops and returns the SAME 100 projects 4 times. So giving me in total 400 projects. We currently have 385 projects. $Org = "ORGNAME" $personalToken = "MYTOKEN" ################################################### Write-Host "Initialize authentication context" -ForegroundColor Yellow

Upload an attachment to azure devops [REST API]

旧街凉风 提交于 2020-12-13 12:14:08
问题 I'm having a hard time adding a attachments in my azure devops repo via api... public static void putAttachments(Integer id) { try { URL url = new URL( "https://dev.azure.com/marcoparra0034/AgileFr/_apis/wit/attachments?api-version=5.1&fileName=imageAs.png"); HttpURLConnection con = ResApiMain.apiConnectionAttachments(PAT, url); File file = new File("C:\\Users\\marco.parra\\Pictures\\Screenshots\\new.png"); String base64Image = encodeFileToBase64Binary(file); // String jsonInputString = "[{\

How to get valid AAD v2 token using MSAL.js for Azure DevOps

限于喜欢 提交于 2020-12-04 05:20:15
问题 ADAL.js and AAD v1 works to access Azure DevOps using delegated user_impersonation scope. I used the same AAD Application Id with delegated permissions to generate access tokens using MSAL.js. The tokens were created successfully, but the access token does not work to access Azure DevOps. The only meaningful difference in the decoded JWT token is that the "aud" claims are different. In ADAL/v1, the aud is the application id of Azure DevOps: "aud": "499b84ac-1321-427f-aa17-267ca6975798" In

How to get valid AAD v2 token using MSAL.js for Azure DevOps

百般思念 提交于 2020-12-04 05:19:29
问题 ADAL.js and AAD v1 works to access Azure DevOps using delegated user_impersonation scope. I used the same AAD Application Id with delegated permissions to generate access tokens using MSAL.js. The tokens were created successfully, but the access token does not work to access Azure DevOps. The only meaningful difference in the decoded JWT token is that the "aud" claims are different. In ADAL/v1, the aud is the application id of Azure DevOps: "aud": "499b84ac-1321-427f-aa17-267ca6975798" In

How to get valid AAD v2 token using MSAL.js for Azure DevOps

♀尐吖头ヾ 提交于 2020-12-04 05:19:02
问题 ADAL.js and AAD v1 works to access Azure DevOps using delegated user_impersonation scope. I used the same AAD Application Id with delegated permissions to generate access tokens using MSAL.js. The tokens were created successfully, but the access token does not work to access Azure DevOps. The only meaningful difference in the decoded JWT token is that the "aud" claims are different. In ADAL/v1, the aud is the application id of Azure DevOps: "aud": "499b84ac-1321-427f-aa17-267ca6975798" In

How to get valid AAD v2 token using MSAL.js for Azure DevOps

白昼怎懂夜的黑 提交于 2020-12-04 05:17:44
问题 ADAL.js and AAD v1 works to access Azure DevOps using delegated user_impersonation scope. I used the same AAD Application Id with delegated permissions to generate access tokens using MSAL.js. The tokens were created successfully, but the access token does not work to access Azure DevOps. The only meaningful difference in the decoded JWT token is that the "aud" claims are different. In ADAL/v1, the aud is the application id of Azure DevOps: "aud": "499b84ac-1321-427f-aa17-267ca6975798" In

Azure DevOps audit logs download rest api not downloading filtered data for given months

我是研究僧i 提交于 2020-12-01 18:03:54
问题 Hi I am not able able to download data for mentioned duration , It downloads all the logs. $outfile = "/logs.csv" $connectionToken="" $base64AuthInfo= [System.Convert]::ToBase64String([System.Text.Encoding]:: ASCII.GetBytes(":$($connectionToken)")) $AuditLogURL = "https://auditservice.dev.azure.com/{og_name}/_apis/audit/downloadlog? format=csv&startTime=2020-09-04T00.00.00&endTime=2020-10-05T00.00.00&api-version=6.1- preview.1" $AuditInfo = Invoke-RestMethod -Uri $AuditLogURL -Headers @

Azure DevOps audit logs download rest api not downloading filtered data for given months

耗尽温柔 提交于 2020-12-01 17:35:40
问题 Hi I am not able able to download data for mentioned duration , It downloads all the logs. $outfile = "/logs.csv" $connectionToken="" $base64AuthInfo= [System.Convert]::ToBase64String([System.Text.Encoding]:: ASCII.GetBytes(":$($connectionToken)")) $AuditLogURL = "https://auditservice.dev.azure.com/{og_name}/_apis/audit/downloadlog? format=csv&startTime=2020-09-04T00.00.00&endTime=2020-10-05T00.00.00&api-version=6.1- preview.1" $AuditInfo = Invoke-RestMethod -Uri $AuditLogURL -Headers @