简体   繁体   English

如何使用访问令牌管理每个Microsoft Azure用户资源?

[英]How to manage every Microsoft Azure user resource with access token?

I would like to create an MVC application, where users can be authorized with their Azure subscription and after that my application can manage their resources hosted in Microsoft Azure (VM-s, Web Sites, etc.) 我想创建一个MVC应用程序,可以在其中授权用户的Azure订阅,然后我的应用程序可以管理其在Microsoft Azure中托管的资源(VM,网站等)。

I created an application with the help of this tutorial . 我在本教程的帮助下创建了一个应用程序。

I can create cloud storages, VMs, etc, so it seems works fine. 我可以创建云存储,VM等,因此看起来工作正常。

After that I tried to log in with a different Azure account. 之后,我尝试使用其他Azure帐户登录。 I can get the Subscription, but I can't manage the resources of that user, I always get an exception: 我可以获得订阅,但是我无法管理该用户的资源,但总是会遇到异常:

Additional information: AuthenticationFailed: A security token exception occured for the received JWT token.

It seems that with this technique I can manage only my resources. 似乎通过这种技术,我只能管理我的资源。

My question is how can I do the following with every other user? 我的问题是如何与其他所有用户一起执行以下操作? Can I do this with this method or I have to make it another way? 我可以使用这种方法执行此操作,还是必须另辟way径?

The application you are creating is allowed to access your resources, and not the resources of other subscriptions. 您正在创建的应用程序被允许访问您的资源,而不是其他订阅的资源。 If you want to manage other subscriptions you would need to have one application defined as in the tutorial for every subscription you want to manage. 如果要管理其他订阅,则需要为每个要管理的订阅定义一个应用程序,如本教程中所述。

AFAIK, there is no API to create an application in AAD, therefore your scenario would require users to manually create these applications, which seems to me a dealbreaker. AFAIK,没有在AAD中创建应用程序的API,因此您的方案将要求用户手动创建这些应用程序,在我看来这是一个破坏者。

暂无
暂无

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

相关问题 如何使用访问令牌请求 microsoft azure 资源? 简而言之,我们如何在 azure 中使用生成的 access_token? - How to request a microsoft azure resource using a access token? In short how can we use the generated access_token in azure? 如何在ASP.NET Core中为Azure AD请求正确的访问令牌以访问Microsoft Graph - How do request a correct access token in ASP.NET Core for Azure AD to access Microsoft Graph 为 Azure 用户访问检索持久令牌 - Retrieving a persistent token for Azure user access 如何在Microsoft Graph API C#中获取用户ID和访问令牌 - How to get User Id and Access Token in Microsoft Graph API C# 从已经为Microsoft Graph资源生成的访问令牌中获取SharePoint Access令牌(https://graph.microsoft.com) - Get SharePoint Access token from already generated access token for the Microsoft Graph resource (https://graph.microsoft.com) 如何获取已认证用户的访问令牌以进行授权的资源api调用? - How to get access token for authenticated user to make an authorized resource api call? 如何在不涉及用户身份验证的情况下获取 Azure 访问令牌(针对应用程序,而不是用户)? - How to get an Azure access token (for an application, not a user) without involving user authentication? 通过非Microsoft用户凭据获取访问令牌,而无需提示 - Get access token by non-Microsoft user credentials without prompt 如何使用旧的 Microsoft.WindowsAzure .NET ZF20E3C5E5E54C0896D36 为 Azure Blob 访问创建用户委托 SAS 密钥 - How to create a User delegation SAS key for Azure Blob access using old Microsoft.WindowsAzure .NET SDK? 没有身份和用户帐户的基于令牌的资源访问 - Token-based access to resource without Identity & User Accounts
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM