2016-05-23 60 views
0

我们有一个Web应用程序,使用Azure AD与Office 365进行OAuth。我们正试图限制我们有权访问的资源。 示例:认证用户可以访问Site1,Site2和Site3。我们只想限制我们对Site1的应用程序访问。有谁知道这是否可能?我试图通过Office 365,Azure AD,甚至是Discovery API文档,但我找不到任何有用的信息。在OAuth期间限制办公室365中的资源访问

回答

0

您是否还在Azure AD上注册了site1,site2和site3?如果我理解正确的话,我们可以配置为SITE1,SITE2与本站3设置需要许可像下面的应用程序清单(见here

"oauth2Permissions": [ 
{ 
    "adminConsentDescription": "Allow the application full access to the Todo List service on behalf of the signed-in user", 
    "adminConsentDisplayName": "Have full access to the Todo List service", 
    "id": "b69ee3c9-c40d-4f2a-ac80-961cd1534e40", 
    "isEnabled": true, 
    "type": "User", 
    "userConsentDescription": "Allow the application full access to the todo service on your behalf", 
    "userConsentDisplayName": "Have full access to the todo service", 
    "value": "user_impersonation" 
    } 
], 

然后,我们需要分配与权许可的Web应用程序Microsoft构建服务如下图所示: enter image description here

最后一步是,site1,site2,site3需要通过分析访问令牌中的作用域来验证请求是否具有访问资源的权限。