简体   繁体   English

iOS中的Azure AD身份验证

[英]Azure AD authentication in iOS

I build an iOS application, am trying to authenticate against Azure AD 2.0. 我构建一个iOS应用程序,试图针对Azure AD 2.0进行身份验证。

My web API gives me proper data when I send a valid token after Azure AD authentication. 在Azure AD身份验证后发送有效令牌时,我的Web API为我提供了正确的数据。

I am trying to use ADAL: 我正在尝试使用ADAL:

https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications https://docs.microsoft.com/zh-cn/azure/active-directory/develop/active-directory-integrating-applications

Am I doing it right? 我做对了吗? If I am able to get a valid auth token, how would I ensure everytime that the token is valid and I done need to ask credentials to user? 如果我能够获得有效的身份验证令牌,那么我将如何确保每次令牌都有效并且确实需要向用户询问凭据?

I am following this link step by step, Unfortunately I get into error after entering my credentials - Need Admin Approval yourapp needs permission to access resources in your organization that only an admin can grant. 我正在逐步跟踪此链接,不幸的是,输入凭据后出现错误-需要管理员批准yourapp需要访问您组织中只有管理员才能授予资源的权限。 Please ask an admin to grant permission to this app before you can use it 请先向管理员授予此应用的权限,然后才能使用它

have an admin account ? 有一个管理员帐户? Sign in with that account 使用该帐户登录

return to the application without granting consent 未经同意即返回申请

request id: XXX correlation id: xxx timestamp: xxx Message: AADSTS90094: is requesting permission which you are not authorized to grant. 请求ID:XXX相关ID:XXX时间戳:XXX消息:AADSTS90094:正在请求您无权授予的许可。 Contact your adinistrator, who can grant permissions to this application on your behalf 与您的主持人联系,他可以代表您授予该应用程序的权限

Advanced diagonistics: Enable If you plan on getting support to this issue, turn this on and try to reproduce the error. 高级对角线:启用如果您打算获得对此问题的支持,请打开此开关并尝试重现该错误。 this will collect additional information that will help troubleshoot the issue. 这将收集有助于解决问题的其他信息。 ideally it should display the concent page, as per the link... what steps am i missing ? 理想情况下,它应该根据链接显示集中页面...我缺少哪些步骤?

Try using your global administrator account (ie the onmicrosoft.com account) that was used when your tenant was first created. 尝试使用首次创建承租人时使用的全局管理员帐户(即onmicrosoft.com帐户)。 A regular admin may not work for this. 普通管理员可能对此不起作用。

The user needs to be assigned global admin access to the application itself. 需要为用户分配对应用程序本身的全局管理员访问权限。 Please post a screenshot of the user permissions in your portal. 请在您的门户中发布用户权限的屏幕截图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM