简体   繁体   English

Azure应用程序的Azure Active Directory应用程序角色

[英]Azure Active Directory App Roles for Native App

I have successfully registered both my web api and native app with Azure AD. 我已经使用Azure AD成功注册了我的web api和本机应用程序。 I can authorise my native app and access the secured web api. 我可以授权我的原生应用并访问安全的网络API。

My question is about App Roles, I can't seem to find a way to add App Roles to a native app registration and then assign them to users. 我的问题是关于App Roles,我似乎找不到将App Roles添加到本机应用程序注册然后将其分配给用户的方法。

This seems possible for web apps but not for native apps. 这似乎可以用于Web应用程序,但不适用于本机应用程序

I am using the ADALiOS library, if that helps. 我正在使用ADALiOS库,如果这有帮助的话。

Any suggestions about how to get role claims into my token would be appreciated. 任何关于如何将角色声明放入我的令牌的建议将不胜感激。

Thanks 谢谢

Chris 克里斯

App Roles need to be defined on the resource(which needs protected access) and not on the client, so in your case you need to set this on your web api. 应用角色需要在资源上定义(需要受保护的访问权限),而不是在客户端上定义,因此在您的情况下,您需要在Web api上设置此角色。 You can follow this sample to set it. 您可以按照此示例进行设置。

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

相关问题 Active Directory B2C 可以使用 Native Facebook App 而不是 webview 吗? - Can Active Directory B2C use the Native Facebook App instead of webview? Mobileiron:Active Directory中的iOS应用授权 - Mobileiron: iOS App authorization in Active Directory 如何使用iOS应用程序向Active Directory进行身份验证 - How to authenticate to Active Directory using iOS app 使用活动目录对网站和应用程序进行身份验证 - Using active directory for authentication of both site and app Azure AD本机应用程序的名称和重定向URL - Name and redirect URL of Azure AD Native App 本机应用上的Azure AD Oauth 2.0 - Azure AD Oauth 2.0 on Native App 通过citrix使用iOS应用访问活动目录信息 - Accessing the active directory info using iOS app through citrix 在不使用默认./ios目录的情况下反应Native iOS应用设置 - React Native iOS app setup without using default ./ios directory 将Azure ADAL库添加到iOS本机应用程序中的资源包问题 - Problems with resource bundles in adding Azure ADAL library to an iOS native app 首次启动应用程序时,向Azure Hub的本机注册始终会崩溃 - Native registration to Azure hub always crashes the first time the app is launched
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM