简体   繁体   English

如何使用ASP.NET MVC的Windows集成登录从Azure AD获取访问令牌?

[英]How to get access token from Azure AD using Windows Integrated login from ASP.NET MVC?

Is there any way to get access token from Azure AD using Windows Integrated login from ASP.NET MVC? 是否可以通过ASP.NET MVC使用Windows Integrated登录从Azure AD获取访问令牌? I've just tried to use ADAL to login providing tenant, client credentials (id and secret) and user login but it responds that "Managed users must provide password". 我刚刚尝试使用ADAL登录以提供租户,客户端凭据(ID和机密)和用户登录,但是它回答“受管用户必须提供密码”。

That's an organizational account and I don't want to show consent screen to the user if they even need to provide password. 这是一个组织帐户,如果他们甚至需要提供密码,我也不想向用户显示同意屏幕。

You should be able to do this using OpenID Connect. 您应该能够使用OpenID Connect执行此操作。 I believe you can use the OpenID Connect sign-in request by decorating a class or method with the [Authorize] attribute. 我相信您可以通过使用[Authorize]属性装饰类或方法来使用OpenID Connect登录请求。 See this document for more details to see if it helps. 有关更多详细信息,请参阅本文档,以了解是否有帮助。 https://azure.microsoft.com/en-us/resources/samples/active-directory-dotnet-native-headless/ https://azure.microsoft.com/en-us/resources/samples/active-directory-dotnet-native-headless/

暂无
暂无

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

相关问题 如何使用 asp.net mvc 从 azure 获取访问令牌 - How to get the access token from azure using asp.net mvc 使用 MS Identity 平台(Azure AD 身份验证)时,如何在 ASP.Net MVC 中的任何操作之前对用户进行身份验证后从 Azure AD 访问信息 - How access info from Azure AD after user is authenticated prior to any action in ASP.Net MVC when using MS Identity platform (Azure AD Authentication) 无法使用 Windows 身份验证通过来自 ASP.NET 应用程序的个人访问令牌向 Azure DevOps 进行身份验证 - Can't authenticate to Azure DevOps with Personal Access Token from ASP.NET app using Windows authentication ASP.NET MVC如何将应用程序从ASP.NET身份转换为Azure AD - ASP.NET MVC How to convert application from ASP.NET Identity to Azure AD 如何从 Asp.net MVC 中的 Azure 访问应用程序设置 - How to access App Settings from Azure in Asp.net MVC 如何在OwinContext的Asp.net MVC5 Controller动作中获取访问令牌 - How to get access token in Asp.net MVC5 Controller action from OwinContext 如何使用Azure AD和asp.net MVC保护控制器访问 - How to secure controller access using Azure AD and asp.net MVC 如何从 ASP.Net MVC 5 应用程序检索和管理多个 Azure AD 令牌 - How to retreive and manage MULTIPLE Azure AD tokens from an ASP.Net MVC 5 application 使用Azure AD时处理Asp.Net MVC中的令牌超时 - Handle token timeout in Asp.Net MVC when using Azure AD 从OAuth令牌Asp.net MVC获取电子邮件地址 - Get email address from OAuth token Asp.net MVC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM