小编Rod*_*ner的帖子

什么是 AuthorizationLevel.User 以及如何正确使用它?

我刚刚将我的函数应用程序配置为使用 azure Active Directory。之后,我想通过更改 HttpTrigger 属性的枚举来停用功能级身份验证。然后我发现可以切换到“用户”授权级别,其描述为:

允许访问包含有效身份验证令牌的请求

部署函数后,我只收到 401 个未经授权的请求,因此我切换回匿名授权级别。

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 …
Run Code Online (Sandbox Code Playgroud)

azure azure-functions

8
推荐指数
1
解决办法
7275
查看次数

标签 统计

azure ×1

azure-functions ×1