Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's AuthorizationLevel.User and how to use it correctly?

I just configured my function app to use azure active directory. After that I wanted to deactivated the function level authentication by changing the enum at the HttpTrigger Attribute. Then I discovered that there is the possibility to switch to "User" AuthorizationLevel which is described as:

Allow access to requests that include a valid authentication token

After I deployed my Function I only get 401 unauthorized requests, so i switched back to Anonymous authorization level.

public enum AuthorizationLevel
    {
        //
        // Summary:
        //     Allow access to anonymous requests.
        Anonymous = 0,
        //
        // Summary:
        //     Allow access to requests that include a valid authentication token
        User = 1,
        //
        // Summary:
        //     Allow access to requests that include a function key
        Function = 2,
        //
        // Summary:
        //     Allows access to requests that include a system key
        System = 3,
        //
        // Summary:
        //     Allow access to requests that include the master key
        Admin = 4
    }

So my question is, how to use "user" authorization level correctly? And can I use it with azure active directory enabled?

like image 624
Rodrigo Groener Avatar asked Jan 30 '23 13:01

Rodrigo Groener


2 Answers

User isn't currently supported. It will eventually be used to support App Service authentication, but that doesn't work today.

like image 117
brettsam Avatar answered Feb 02 '23 08:02

brettsam


As of today user level is still unsupported, its scheduled for:

v2 GA release (which also doesn't have a specific date, other than later this year).

Progress can be tracked here; Support EasyAuth #33.

like image 25
James Wood Avatar answered Feb 02 '23 10:02

James Wood