Microsoft Entra ID Graph API 사용 중지
Microsoft Entra ID(이전의 Azure Active Directory 또는 Azure AD) Graph API 서비스는사용 중지됩니다. 이러한 사용 중지는 Microsoft Entra ID 플랫폼을 간소화하고 Microsoft Entra ID 개발자 환경을 개선하기 위한 광범위한 노력의 일환입니다.
완화 단계
Graph API 사용 중지는 모든 Azure Stack Hub 고객에게 영향을 미치며 영향을 받은 모든 애플리케이션에 대해 이 문서에 포함된 스크립트를 실행해야 합니다. Graph API에 계속 액세스해야 하는 애플리케이션이 있는 경우 스크립트는 이러한 특정 애플리케이션이 2025년 6월까지 레거시 Graph API를 계속 호출할 수 있도록 확장에 대해 이러한 애플리케이션을 구성하는 플래그를 설정합니다.
이 문서에 제공된 PowerShell 스크립트는 각 애플리케이션에 대한 플래그를 설정하여 Azure Stack Hub의 각 Entra ID ID 공급자에 대해 Graph API 확장을 구성합니다.
엔트라 ID를 ID 공급자로 사용하는 Azure Stack Hub 환경이 계속 작동하도록 하려면 2025년 2월 말까지 이 스크립트를 실행해야 합니다.
메모
2025년 2월 이후 이 플래그 추가를 지연하면 인증이 실패합니다. 그런 다음, 이 스크립트를 실행하여 Azure Stack Hub가 필요에 따라 작동하도록 할 수 있습니다.
스크립트 실행
Azure Stack Hub에서 "홈 디렉터리"(Azure Stack Hub의 기본 ID 공급자)로 사용하는 Entra ID 환경에서 다음 PowerShell 스크립트를 실행합니다. 스크립트는 Azure와 상호 작용하므로 특정 컴퓨터에서 실행할 필요가 없습니다. 그러나 스크립트를 실행하려면 해당 Entra ID 테넌트에서 적어도 "애플리케이션 관리자" 권한이 필요합니다.
로컬 컴퓨터에서 관리자 권한으로 다음 스크립트를 실행해야 합니다.
# Install the graph modules if necessary
#Install-Module Microsoft.Graph.Authentication
#Install-Module Microsoft.Graph.Applications
$ErrorActionPreference='Stop'
Import-Module Microsoft.Graph.Authentication
Import-Module Microsoft.Graph.Applications
# Repeat this flow for each of your target directory tenants
$tenantId = 'MyTenantId'
# Sign-in with admin permissions to read and write all application objects
Connect-MgGraph -TenantId $tenantId -Scopes Application.ReadWrite.All
# Retrieve all applications in the current directory
Write-Host "Looking-up all applications in directory '$tenantId'..."
$applications = Get-MgApplication -All -Property id, displayName, appId, identifierUris, requiredResourceAccess, authenticationBehaviors
Write-Host "Found '$($applications.Count)' total applications in directory '$tenantId'"
# Find all the unique deployment guids, each one representing an Azure Stack deployment in the current directory
$deploymentGuids = $applications.IdentifierUris |
Where-Object { $_ -like 'https://management.*' -or $_ -like 'https://adminmanagement.*' } |
ForEach-Object { "$_".Split('/')[3] } |
Select-Object -Unique
Write-Host "Found '$($deploymentGuids.Count)' total Azure Stack deployments in directory '$tenantId'"
# Find all the Azure Stack application objects for each deployment
$azureStackApplications = @()
foreach ($application in $applications)
{
foreach ($deploymentGuid in $deploymentGuids)
{
if (($application.IdentifierUris -join '') -like "*$deploymentGuid*")
{
$azureStackApplications += $application
}
}
}
# Find which Azure Stack applications require access to Legacy Graph Service
$azureStackLegacyGraphApplications = $azureStackApplications |
Where-Object { $_.RequiredResourceAccess.ResourceAppId -contains '00000002-0000-0000-c000-000000000000' }
# Find which of those applications need to have their authentication behaviors patched to allow access to Legacy Graph
$azureStackLegacyGraphApplicationsToUpdate = $azureStackLegacyGraphApplications |
Where-Object { -not ($ab = $_.AdditionalProperties.authenticationBehaviors) -or -not $ab.ContainsKey(($key='blockAzureADGraphAccess')) -or $ab[$key] }
# Update the applications which require their authentication behaviors patched to allow access to Legacy Graph
Write-Host "Found '$($azureStackLegacyGraphApplicationsToUpdate.Count)' total Azure Stack applications which need permission to continue calling Legacy Microsoft Graph Service"
$count = 0
foreach ($application in $azureStackLegacyGraphApplicationsToUpdate)
{
$count++
Write-Host "$count/$($azureStackLegacyGraphApplicationsToUpdate.Count) - Updating application '$($application.DisplayName)' (appId=$($application.AppId)) (id=$($application.Id))"
Update-MgApplication -ApplicationId $application.Id -BodyParameter @{
authenticationBehaviors = @{ blockAzureADGraphAccess = $false }
}
}
스크립트는 다음 샘플 출력을 표시합니다.
Looking-up all applications in directory '<ID>'...
Found '###' total applications in directory '<ID>'
Found '1' total Azure Stack deployments in directory '<app ID>'
Found '16' total Azure Stack applications which need permission to continue calling Legacy Microsoft Graph Service
1/16 - Updating application 'Azure Stack - AKS' (appId=<app ID>) (id=<ID>)
2/16 - Updating application 'Azure Stack - Hubs' (appId=<app ID>) (id=<ID>)
3/16 - Updating application 'Azure Stack - Portal Administration' (appId=<app ID>) (id=<app>)
4/16 - Updating application 'Azure Stack - RBAC Administration' (appId=<app ID>) (id=ID)
5/16 - Updating application 'Azure Stack - Container Registry' (appId=<app ID>) (id=ID)
6/16 - Updating application 'Azure Stack - RBAC' (appId=<app ID>) (id=ID)
7/16 - Updating application 'Azure Stack - Hubs Administration' (appId=<app ID>) (id=ID)
8/16 - Updating application 'Azure Stack - Deployment Provider' (appId=<app ID>) (id=ID)
9/16 - Updating application 'Azure Stack - Deployment' (appId=<app ID>) (id=ID)
10/16 - Updating application 'Azure Stack - KeyVault' (appId=<app ID>) (id=ID)
11/16 - Updating application 'Azure Stack' (appId=<app ID>) (id=ID)
12/16 - Updating application 'Azure Stack - Administration' (appId=<app ID>) (id=ID)
13/16 - Updating application 'Azure Stack - Policy Administration' (appId=<app ID>) (id=ID)
14/16 - Updating application 'Azure Stack - Policy' (appId=<app ID>) (id=ID)
15/16 - Updating application 'Azure Stack - Portal' (appId=<app ID>) (id=ID)
16/16 - Updating application 'Azure Stack - KeyVault Administration ' (appId=<app ID>) (id=ID)
스크립트를 두 번째로 실행하여 모든 애플리케이션이 업데이트되었는지 확인합니다. 모든 애플리케이션이 성공적으로 업데이트된 경우 스크립트는 다음 출력을 반환해야 합니다.
Looking-up all applications in directory '<ID>'...
Found '####' total applications in directory '<ID>>'
Found '1' total Azure Stack deployments in directory '<ID>>'
Found '0' total Azure Stack applications which need permission to continue calling Legacy Microsoft Graph Service