ADAL库 - 客户端已请求访问未在客户端应用程序注册中请求的权限中列出的资源

时间:2017-05-29 16:17:08

标签: ios swift adal

我正在尝试使用库登录Microsoft的api。我的目的是在我的日历上读写任务。我使用以下代码访问访问代码:

2017-05-29 13:05:26.473556 CRM & Sales[1174:988990] ADAL 2.3.0 iOS 10.2 [2017-05-29 16:05:26] ERROR: Error raised: (Domain: "ADOAuthServerErrorDomain" Code: AD_ERROR_SERVER_AUTHORIZATION_CODE ProtocolCode: "access_denied" Details: "AADSTS65005: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: bb5e40e8-1fcc-47ac-XXXXXXXXX. Resource value from request: https://graph.windows.net. Resource app ID: 00000002-0000-0000-c000-000000000000. List of valid resources from app registration: 00000003-0000-0000-c000-000000000000.

Trace ID: e2f4f866-1aa1-4fb6-b37e-9ae432174b00

Correlation ID: af10d363-151a-452b-a6d2-a94cd6772ca4

Timestamp: 2017-05-29 16:05:26Z"

但是我发现了这个错误:

@Configuration
public class StaticResourceConfiguration extends WebMvcConfigurerAdapter {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/ui").addResourceLocations("file:/path/to/your/angular/files");
    }
}

this is my settings

我可以做错什么?

1 个答案:

答案 0 :(得分:1)

该应用已被授予GUID 00000003-0000-0000-c000-000000000000资源的访问权限。您正在请求具有GUID 00000002-0000-0000-c000-000000000000。

的资源

您应该重新检查您的应用权限。