Azure自动化登录到不同的租户,使用缓存的会话 [英] Azure automation sign in to different tenants, uses cached sessions

查看:77
本文介绍了Azure自动化登录到不同的租户,使用缓存的会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为CSP一级合作伙伴,我们管理许多客户订阅.每次客户订购新订阅时,我们都会启动一本运行手册来创建/注册AAD应用程序和/或设置一些RBAC角色.

As a tier1 CSP partner we manage a lot of customer subscriptions. Each time a customer orders a new subscription we kick off a runbook to create/register AAD application and/or set some RBAC roles.

Runbook运行了好几个月,但最近开始出现故障.似乎同时启动多个Runbook时,Azure自动化使用来自另一个Runbook的会话.当我浏览测试窗格时,一切都按预期进行.

The runbook ran fine for several months but started to fail recently. It seems that when multiple runbooks start at the same time, Azure Automation uses a session from another runbook. When I run through the test pane everything works as intended.

每个租户都使用相同的凭据.

There's the same credentials used against every tenant.

不允许张贴图片,但请参阅以下推文:

Im not allowed to post pictures, but see this tweet https://twitter.com/ehrnst/status/1065941553233960960

推荐答案

据我所知,这是预期的行为.避免这种情况的一种方法是确保两个或多个具有不同上下文的运行手册不会同时运行.另一个选择是尝试使用Azure上下文并在唯一的目录下执行AzureRM命令 启动的每个运行手册创建的上下文.我不确定这是否适合您的情况.由于此问题不容易重现,因此您必须进行大量测试.

As far as I know this is expected behavior. One way to avoid this is to make sure that two or more runbooks with different contexts are not running at the same time. Other option is to try to use Azure Context and execute the AzureRM commands under the unique context created by each runbook started. I am not sure if this will work in your case. You will have to do a lot of testing as this issue is not easily reproduced.

将此回复标记为有用的答案.

Mark this reply as answer if it was useful.


这篇关于Azure自动化登录到不同的租户,使用缓存的会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆