Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-DurableStatus 401 error #745

Open
mikeburns7 opened this issue Jan 24, 2022 · 2 comments
Open

Get-DurableStatus 401 error #745

mikeburns7 opened this issue Jan 24, 2022 · 2 comments

Comments

@mikeburns7
Copy link

I am attempting to run the powershell command the following "Get-Durablestatus" command and getting the following 401 error. I believe the command is not including the systemkey for the storage url?
Command
$Status = Get-DurableStatus -InstanceId $InstanceId -ShowHistory -ShowHistoryOutput -ShowInput -ErrorAction SilentlyContinue

Error output

2022-01-24T19:19:17.355 [Error] EXCEPTION: Response status code does not indicate success: 401 (Unauthorized).Exception :Type : Microsoft.PowerShell.Commands.HttpResponseExceptionResponse : StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:{WWW-Authenticate: BearerRequest-Context: appId=cid-v1:5ae61ae1-625c-41c4-80b2-a70abff930cfDate: Mon, 24 Jan 2022 19:19:16 GMTContent-Length: 0}TargetSite :Name : ThrowTerminatingErrorDeclaringType : System.Management.Automation.MshCommandRuntime, System.Management.Automation, Version=7.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35MemberType : MethodModule : System.Management.Automation.dllStackTrace :at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)Message : Response status code does not indicate success: 401 (Unauthorized).Source : System.Management.AutomationHResult : -2146233088TargetObject : Method: GET, RequestUri: 'https://funcsvbidnardev006.azurewebsites.net/runtime/webhooks/durabletask/instances/49cfb33b-6c81-4a6a-8a80-cbe319d711a9?showHistory=true&showHistoryOutput=true&showInput=true', Version: 1.1, Content: System.Net.Http.StringContent, Headers:{User-Agent: Mozilla/5.0User-Agent: (Windows NT 10.0; Microsoft Windows 10.0.14393; en-US)User-Agent: PowerShell/7.0.7Content-Length: 0}CategoryInfo : InvalidOperation: (Method: GET, Reques…ontent-Length: 0}:HttpRequestMessage) [Invoke-RestMethod], HttpResponseExceptionFullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommandInvocationInfo :MyCommand : Invoke-RestMethodScriptLineNumber : 66OffsetInLine : 5HistoryId : 1ScriptName : C:\Program Files (x86)\SiteExtensions\Functions\4.0.1\workers\powershell\7\Modules\Microsoft.Azure.Functions.PowerShellWorker\Microsoft.Azure.Functions.PowerShellWorker.psm1Line : Invoke-RestMethod -Uri $requestUrlPositionMessage : At C:\Program Files (x86)\SiteExtensions\Functions\4.0.1\workers\powershell\7\Modules\Microsoft.Azure.Functions.PowerShellWorker\Microsoft.Azure.Functions.PowerShellWorker.psm1:66 char:5+ Invoke-RestMethod -Uri $requestUrl+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\Program Files (x86)\SiteExtensions\Functions\4.0.1\workers\powershell\7\Modules\Microsoft.Azure.Functions.PowerShellWorkerPSCommandPath : C:\Program Files (x86)\SiteExtensions\Functions\4.0.1\workers\powershell\7\Modules\Microsoft.Azure.Functions.PowerShellWorker\Microsoft.Azure.Functions.PowerShellWorker.psm1InvocationName : Invoke-RestMethodCommandOrigin : InternalScriptStackTrace : at Get-DurableStatus, C:\Program Files (x86)\SiteExtensions\Functions\4.0.1\workers\powershell\7\Modules\Microsoft.Azure.Functions.PowerShellWorker\Microsoft.Azure.Functions.PowerShellWorker.psm1: line 66at <ScriptBlock>, C:\home\site\wwwroot\QueueTrigger1\run.ps1: line 10PipelineIterationInfo : 2022-01-24T19:19:17.433 [Error] Executed 'Functions.QueueTrigger1' (Failed, Id=71ffc9dc-8002-4904-9e2f-01a82385977e, Duration=5338ms)Result: FailureException: Response status code does not indicate success: 401 (Unauthorized).Stack: at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)at System.Management.Automation.Runspaces.Pipeline.Invoke()at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection1 output, PSInvocationSettings settings)at System.Management.Automation.PowerShell.Invoke[T](IEnumerable input, IList1 output, PSInvocationSettings settings)at System.Management.Automation.PowerShell.Invoke[T]()at Microsoft.Azure.Functions.PowerShellWorker.PowerShell.PowerShellExtensions.InvokeAndClearCommands[T](PowerShell pwsh) in /home/vsts/work/1/s/src/PowerShell/PowerShellExtensions.cs:line 45at Microsoft.Azure.Functions.PowerShellWorker.PowerShell.PowerShellManager.InvokeNonOrchestrationFunction(DurableController durableController, IDictionary outputBindings) in /home/vsts/work/1/s/src/PowerShell/PowerShellManager.cs:line 294at Microsoft.Azure.Functions.PowerShellWorker.PowerShell.PowerShellManager.InvokeFunction(AzFunctionInfo functionInfo, Hashtable triggerMetadata, TraceContext traceContext, IList1 inputData, FunctionInvocationPerformanceStopwatch stopwatch) in /home/vsts/work/1/s/src/PowerShell/PowerShellManager.cs:line 229at Microsoft.Azure.Functions.PowerShellWorker.RequestProcessor.InvokeFunction(AzFunctionInfo functionInfo, PowerShellManager psManager, FunctionInvocationPerformanceStopwatch stopwatch, InvocationRequest invocationRequest) in /home/vsts/work/1/s/src/RequestProcessor.cs:line 333at Microsoft.Azure.Functions.PowerShellWorker.RequestProcessor.ProcessInvocationRequestImpl(StreamingMessage request, AzFunctionInfo functionInfo, PowerShellManager psManager, FunctionInvocationPerformanceStopwatch stopwatch) in /home/vsts/work/1/s/src/RequestProcessor.cs:line 306`

@mikeburns7 mikeburns7 changed the title Get-DurableStauts 401 error Get-DurableStatus 401 error Jan 24, 2022
@mikeburns7
Copy link
Author

Note - this runs fine in my local vscode environment

@pescador9
Copy link

This is still a problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants