Trying to hit the aure API and got the results and continuous token but not ablt to pass the continuous token both from postman and powershell code Kindly let me know how to use continuous token.
$response1 = Invoke-RestMethod $URI -Method 'POST' -Headers $headerss -Body $bodyy -ContentType "application/json"
$continuationToken= $response1.continuationToken | ConvertTo-Json
$continuationToken.token
$response1.headerss.'x-ms-continuationtoken'
$continuationToken = [System.Web.HttpUtility]::UrlEncode($continuationToken)
Invoke-RestMethod -Headers @{Authorization = "Bearer $($continuationToken)"} -Uri $URI -Method 'POST' -Verbose
Invoke-RestMethod : {"error":{"code":"InvalidAuthenticationToken","message":"The access token is invalid."}}
At line:34 char:1
- Invoke-RestMethod -Headers @{Authorization = "Bearer $($continuationT ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
- FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand