逻辑应用程序中的Azure虚拟机不工作(InvalidAuthenticationTokenTenant)

bq9c1y66  于 2023-03-03  发布在  其他
关注(0)|答案(1)|浏览(123)

我正在尝试创建一个Logic应用以自动在Azure中启用我的虚拟机。但我在启动时收到一个奇怪的错误,搜索Internet无法帮助我找到解决方案。Logic应用中的Azure虚拟机无法正常工作(InvalidAuthenticationTokenTenant)我正在尝试创建一个Logic应用以自动在Azure中启用我的虚拟机。但我在启动时收到一个奇怪的错误,搜索Internet没有帮助我找到解决方案。我希望我的虚拟机每天打开一次,然后关闭。我只有一台虚拟机。

"error": {
    "code": "InvalidAuthenticationTokenTenant",
    "message": "The access token is from the wrong issuer 'https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/'. It must match the tenant 'https://sts.windows.net/aaa/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/aaa' to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later."

“https://login.windows.net/aaa”-其中aaa是我的帐户,我没有其他帐户。“https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/”-应用程序所有者租户ID。
当我手动启动时,机器就会启动。
我使用我的blabla@gmail.com帐户,我的虚拟机需要使用blabla@company.com帐户?但我没有。

e7arh2l6

e7arh2l61#

您需要使用逻辑应用程序的访问控制在虚拟机资源中添加角色分配。
此外,如果您使用不同的租户,则需要在创建应用注册时选择以下选项。

  • 我曾尝试使用带有Active Directory身份验证的逻辑应用程序启动VM,但我也遇到了同样的问题,因为我没有在虚拟机访问控制中为逻辑应用程序添加角色分配。

运行Http请求失败:

  • 由于我没有添加角色分配所需的访问权限,因此无法继续。因此,你需要使用逻辑应用程序的访问控制在虚拟机资源中添加角色分配。

  • 请参阅与您的问题类似的document

  • 一种替代方法是将身份验证类型从AAD oauth更改为系统管理的身份。

  • 您也可以使用逻辑应用程序中的内置操作来启动和停止VM。

  • 我已经测试过了,它按预期工作,

    参考MS文档链接

相关问题