Authorization information in Python Azure Function

%3CLINGO-SUB%20id%3D%22lingo-sub-1833459%22%20slang%3D%22en-US%22%3EAuthorization%20information%20in%20Pytho%20Azure%20Function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1833459%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20a%20premium%20Python%20Azure%20Function%20with%20authentication%20enabled%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E-%20Is%20the%20correct%20way%20to%20identify%20the%20caller%20via%20%3CSTRONG%3Ex-ms-client-principal-name%3C%2FSTRONG%3E%20in%20the%20request%20header%3F%3CBR%20%2F%3E-%20Is%20the%20correct%20way%20to%20get%20the%20claims%20to%20decode%20the%20JWT%20%3CSTRONG%3Ex-ms-client-principal%20in%20the%20request%20header%3C%2FSTRONG%3E%3F%3CBR%20%2F%3E-%20I%20ask%20because%20C%23%20Azure%20functions%20expose%20a%20ClaimsPrincipal%20with%20this%20information.%20Is%20there%20a%20similar%20layer%20of%20abstraction%20for%20Python%20functions%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

In a premium Python Azure Function with authentication enabled:


- Is the correct way to identify the caller via x-ms-client-principal-name in the request header?
- Is the correct way to get the claims to decode the JWT x-ms-client-principal in the request header?
- I ask because C# Azure functions expose a ClaimsPrincipal with this information. Is there a similar layer of abstraction for Python functions?

0 Replies