Azure 门户移动应用权限

Azure Portal Mobile App Permissions

我们刚刚迁移到 Azure 门户,我创建了一个通过 MSAL 进行身份验证的 Xamarin 跨平台应用程序。

当我构建应用程序时。它是在 https://apps.dev.microsoft.com/ 上注册的,并且用户正在顺利通过身份验证。

经过测试,我在我们的 Azure 门户上的应用程序注册下注册了它,像以前一样给了它所需的权限,并更新了代码中的应用程序 ID。

现在,我什至无法浏览我的电子邮件页面。我不断收到消息:"It looks like you're trying to open this resource with an app that hasn't been approved by your IT dept",即使管理员已授予该应用程序权限。不知道从这里去哪里。任何帮助表示赞赏。

提前致谢

When i was building the app. it was registered on https://apps.dev.microsoft.com/, and the user was getting authenticated without any problems.

apps.dev.microsoft.com is used to register the application for Azure AD v2.0, and you could leverage MSAL用于使用AD账号或个人微软账号认证用户。

对于在 Azure 门户上注册的应用程序,您需要使用 ADAL library. Detailed tutorial about integrating Azure AD (v1.0) with your xamarin apps, you could follow here

更新:

根据您的情况,要通过 ADAL 使用 MS Graph,您可以在您的租户下创建一个应用程序并将所需的委派权限添加到 Microsoft Graph API . AcquireTokenAsync 方法如下所示:

var authResult = await authContext.AcquireTokenAsync("https://graph.microsoft.com/", clientId, returnUri, parent);

另外,关于app-only和delegate scopes权限的区别,你可以参考here. Also, you could check differences between Microsoft Graph or Azure AD Graph.