Azure / Azure/azure-functions-dotnet-worker

ClaimsPrincipal is null when StaticWebAppsAuthCookie is set.

Open
#789 4 comments 0 reactions 0 assignees View on GitHub
design
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

I'm currently trying to get the ClaimsPrincipal from my isolated process Azure Function.

Initially I had the same issue as specified here: https://github.com/Azure/azure-functions-dotnet-worker/issues/694.

I upgraded to 1.6 and this fixed my claims being empty. However my ClaimsPrincipal is null.

I have the exact same function with the only difference being that its not a isolated process and the Claims Principal is NOT null. Initially I thought that once the claims got populated that the ClaimsPrincipal will magically work but this was not the case.

![image](https://user-images.githubusercontent.com/6638988/151140002-902352a4-e5d9-4411-a5a1-3ba8e37c841c.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue in an isolated-process Azure Function with StaticWebAppsAuthCookie set, then compare the ClaimsPrincipal result with the equivalent non-isolated function. Done means the isolated function exposes a non-null ClaimsPrincipal while retaining the populated claims.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.