将天蓝色预订从活动目录AD1移动到活动目录AD2。现在,由于使用旧的端点详细信息创建了以前的ARM端点(通过Auto SPN),因此任务开始失败。因此,任务无法生成权限访问令牌。
错误消息
The access token is from the wrong issuer 'https://sts.windows.net/***/'. It must match the tenant 'https://sts.windows.net/<TenantIdNew>/' associated with this subscription.
Please use the authority (URL) 'https://login.windows.net/<TenantIdNew>' 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. (CODE: 401)
其他问题
答案 0 :(得分:1)
有以下可能的解决方案:
AD1
更改为AD2
AD1
和AD2
之间建立信任关系。其他问题的答案
如何找到我的VSTS支持的租户?在哪里可以找到它?
如何找到我的订阅得到支持的租户?在哪里可以找到它?
在移至AD2之后是否可以重用先前创建的服务端点(通过AD1)?
是的。
首先,让我们了解服务端点在内部执行的操作。
现在让我们来看一下案例,
AD1
创建了服务连接,这意味着将在活动目录app1
中创建AD应用{{1}},并为订阅AD1
分配了权限S
移至另一个活动目录S
,但是AD应用{{1}}仍位于先前的活动目录AD2
中。
要重新使用现有服务端点,您必须在服务端点中更新app1
,AD1
和SPN Id
。
如果是手动服务连接,则很容易通过UI进行更新,但如果是SPN自动流,则必须通过REST API更新上述字段。
在迁移到AD2之后,是否可以通过现有服务端点(通过REST API)更新租户ID?
是的。
获取所有端点
请求类型-获取
SPN key
获取特定端点
请求类型-获取
tenant Id
现在响应时更新https://<accountName>.visualstudio.com/<ProjectName>/_apis/distributedtask/serviceendpoints?api-version=3.2-preview.1
,并将其用作更新端点REST API中的主体。
更新端点
请求类型-输入
https://<accountName>.visualstudio.com/<ProjectID>/_apis/distributedtask/serviceendpoints/<SERVICE_ENDPOINT_ID>?api-version=3.2-preview.1
基于MSI的服务端点会被破坏,或者在移至AD2之后它们将可用吗?
是的,您只需要更新服务连接中的tenant Id
。