將 App Center 組織連線到 Azure Active Directory

重要

Visual Studio App Center 已排定於 2025 年 3 月 31 日淘汰。 雖然您可以繼續使用 Visual Studio App Center,直到它完全淘汰為止,但有數個建議您考慮移轉至的建議替代方案。

深入瞭解支持時程表和替代方案。

將您的 AAD 租用戶連線到 App Center

若要將 App Center 組織連線到 Azure Active Directory,請按兩下您的組織,按兩下 [ 管理],然後按兩下 [Azure]。 在 Azure 頁面上,如果您尚未登入,請按兩下 [ 連線 ] 並登入 Azure Active Directory。

App Center:管理貴組織的 Azure 連線

將會顯示 Azure Active Directory 租用戶的清單。 選取您想要的 ,然後按兩下 [ 連線]。

App Center:連線您的租使用者

Azure Active Directory 服務主體

當您將 App Center 帳戶連線至 Azure Active Directory 時,會在 AAD 租使用者中建立服務主體,讓 App Center 讀取您的使用者和安全組。 服務主體是以最小許可權建立的。

檢查App Center服務主體

您可以使用 Microsoft Graph 總管來檢查服務主體,方法是針對 https://graph.microsoft.com/beta/servicePrincipals提交 GET 要求。 (您將需要 Directory.Read.All 許可權才能查看服務主體.)

App Center:GET servicePrinciples 查詢

您也可以使用 Get-AzADServicePrincipal 來擷取服務主體。

Get-AzADServicePrincipal -DisplayName 'App Center'

範例服務主體

以下是建立以將 App Center 連線至範例 Azure AD 租使用者的服務主體。

  • 屬性 displayName 為 “App Center”
  • 屬性 appID 是 “6201c56d-46d7-4152-bdb6-e0c77193784b”,這是 Azure Active Directory 中 App Center 的 GUID
  • publisherName是 “Microsoft Services”
{
      "id": "3bd7a1a6-a74a-f5ed-9721-51ecxxxxxxxx",
      "deletedDateTime": null,
      "accountEnabled": true,
      "appDisplayName": "App Center",
      "appId": "6201c56d-46d7-4152-bdb6-e0c77193784b",
      "applicationTemplateId": null,
      "appOwnerOrganizationId": "f3cdef31-a31e-c3c9-443a-5f57xxxxxxxx",
      "appRoleAssignmentRequired": false,
      "displayName": "App Center",
      "errorUrl": null,
      "homepage": null,
      "info": {
        "termsOfServiceUrl": null,
        "supportUrl": null,
        "privacyStatementUrl": null,
        "marketingUrl": null,
        "logoUrl": null
      },
      "loginUrl": null,
      "logoutUrl": null,
      "notificationEmailAddresses": [],
      "publishedPermissionScopes": [],
      "preferredSingleSignOnMode": null,
      "preferredTokenSigningKeyEndDateTime": null,
      "preferredTokenSigningKeyThumbprint": null,
      "publisherName": "Microsoft Services",
      "replyUrls": [],
      "samlMetadataUrl": null,
      "samlSingleSignOnSettings": null,
      "servicePrincipalNames": [
        "6201c56d-46d7-4152-bdb6-e0c77193784b",
        "https://applicationinsights.azure.com"
      ],
      "signInAudience": "AzureADMultipleOrgs",
      "tags": [],
      "addIns": [],
      "api": {
        "resourceSpecificApplicationPermissions": []
      },
      "appRoles": [],
      "keyCredentials": [],
      "passwordCredentials": []
}

刪除 App Center 帳戶

當您刪除 App Center 帳戶時,服務主體會保留在 Azure Active Directory 租使用者中。 若要移除它,您可以執行 Remove-AzADServicePrincipal

Remove-AzADServicePrincipal -ServicePrincipalName 'App Center'