Azure / Azure/azure-functions-durable-powershell

Get-DurableStatus still causing Error 401 (Unauthorized) in Azure Function App

Open
#73 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
9
Forks
14
Avg merge
1d 23h
Merged PRs (30d)
5

Description

This **issue is still happening** in Azure Durable Functions via HTTP starter function.

Apparently this has been fixed, **but it does not actually seem to be**, see:
- https://github.com/Azure/azure-functions-powershell-worker/issues/745
- https://github.com/Azure/azure-functions-powershell-worker/issues/970
- https://github.com/Azure/azure-functions-durable-powershell/pull/66

To rule out any issues in my own code & functions, I also tested using Microsoft's own examples, showing the issue persists:

Using template:
- DurableClient as regAPStart
- DurableOrchestrator as regAPOrch
- DuragleActivity as regAPAct

The orchestrator and activity are running just fine.

The Starter works fine until it gets to the following line:
`$Status = Get-DurableStatus -InstanceId $InstanceId`

Starter returns:
```
2024-05-03T18:35:58Z [Information] INFORMATION: DurableClient started
2024-05-03T18:35:58Z [Information] INFORMATION: Started orchestration with ID = 'b937fc9d-a34d-4407-a876-c9cdd2f18c2e', FunctionName = 'regAPOrch'
2024-05-03T18:35:58Z [Error] EXCEPTION: Response status code does not indicate success: 401 (Unauthorized).
```

Orchestrator returns:
```
2024-05-03T18:39:51Z [Information] INFORMATION: DurableOrchestrator: started. Input: Hello
2024-05-03T18:39:51Z [Information] INFORMATION: DurableOrchestrator: finished.
2024-05-03T18:39:51Z [Information] OUTPUT: Hello Tokyo
2024-05-03T18:39:51Z [Information] : Function 'regAPOrch (Orchestrator)' completed.
```

Activity returns:
```
2024-05-03T18:39:41Z [Information] INFORMATION: DurableActivity(Tokyo) started
2024-05-03T18:39:51Z [Information] INFORMATION: DurableActivity(Tokyo) finished
2024-05-03T18:39:51Z [Information] Executed 'Functions.regAPAct'
```

Contributor guide

Open the contributing guide

Research direction

Start with the HTTP starter at `$Status = Get-DurableStatus -InstanceId $InstanceId` and reproduce the 401 using the Microsoft template named in the report. Compare the behavior with issues 745 and 970 and pull request 66. Done means the starter can retrieve durable status without returning 401 Unauthorized.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.