$personalAccessToken="fffffffffff";
$token = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($personalToken)"))
$header = @{authorization = "Basic $token"}
$projectsUrl = "https://dev.azure.com/~~~ ~~"
$projects = Invoke-RestMethod -Uri $projectsUrl -Method Get -ContentType "application/json" -Headers $header
$projects.value | ForEach-Object {
I failed to authenticate. … what I am trying to do get the data as a json file and upload on power bi dashboard.
can you guys help me out or show me a sample codE?