Azure Stack Hub에서 포털 사용자 데이터 지우기

Azure Stack Hub 운영자는 Azure Stack Hub 사용자가 요청할 때 요청 시 포털 사용자 데이터를 지울 수 있습니다. Azure Stack Hub 사용자는 타일을 고정하고 dashboard 레이아웃을 변경하여 포털을 사용자 지정할 수 있습니다. 사용자는 테마를 변경하고 개인 기본 설정에 맞게 기본 언어를 조정할 수도 있습니다.

포털 사용자 데이터에는 Azure Stack Hub 사용자 포털에서 즐겨찾기 및 최근에 액세스한 리소스가 포함됩니다. 이 문서에서는 포털 사용자 데이터를 지우는 방법을 설명합니다.

포털 사용자 설정 제거는 사용자 구독이 삭제된 후에만 수행해야 합니다.

참고

일부 사용자 데이터는 이 문서의 지침에 따라 이벤트 로그의 시스템 섹션에 계속 존재할 수 있습니다. 이 데이터는 로그가 자동으로 롤오버될 때까지 며칠 동안 유지될 수 있습니다.

사전 요구 사항

참고

게스트 디렉터리(다중 테넌트)에서 초대된 사용자로부터 포털 사용자 정보를 삭제하려는 경우 해당 디렉터리에 읽기 권한이 있어야 합니다. 자세한 내용은 이 문서의 뒷부분에 있는 CSP 시나리오를 참조하세요.

사용자 계정 이름을 사용하여 포털 사용자 데이터 지우기

이 시나리오에서는 기본 공급자 구독과 사용자가 동일한 디렉터리의 일부이거나 사용자가 있는 디렉터리에 대한 읽기 권한이 있다고 가정합니다.

계속하기 전에 GitHub에서 최신 버전의 Azure Stack Hub 도구를 다운로드 해야 합니다.

이 절차에서는 Azure Stack Hub의 관리자 Resource Manager 엔드포인트와 통신할 수 있는 컴퓨터를 사용합니다.

  1. 관리자 권한 Windows PowerShell 세션을 열고(관리자 권한으로 실행) AzureStack-Tools-az 디렉터리의 루트 폴더로 이동한 다음 필요한 PowerShell 모듈을 가져옵니다.

    Import-Module .\DatacenterIntegration\Portal\PortalUserDataUtilities.psm1
    
  2. 다음 명령을 실행합니다. 자리 표시자를 사용자 환경과 일치하는 값으로 대체해야 합니다.

    ## The following Azure Resource Manager endpoint is for the ASDK. If you are in a multinode environment, contact your operator or service provider to get the endpoint.
    
    $adminARMEndpoint = "https://adminmanagement.local.azurestack.external"
    
    ## Replace the following value with the Azure Stack Hub directory tenant ID.
    $azureStackDirectoryTenantId = "f5025bf2-547f-4b49-9693-6420c1d5e4ca"
    
    ## Replace the following value with the user directory tenant ID.
    $userDirectoryTenantId = " 7ddf3648-9671-47fd-b63d-eecd82ed040e"
    
    ## Replace the following value with name of the user principal whose portal user data is to be cleared.
    $userPrincipalName = "myaccount@contoso.onmicrosoft.com"
    
    Clear-AzsUserDataWithUserPrincipalName -AzsAdminArmEndpoint $adminARMEndpoint `
     -AzsAdminDirectoryTenantId $azureStackDirectoryTenantId `
     -UserPrincipalName $userPrincipalName `
     -DirectoryTenantId $userDirectoryTenantId
    

    참고

    azureStackDirectoryTenantId는 선택 사항입니다. 이 값을 지정하지 않으면 스크립트는 Azure Stack Hub에 등록된 모든 테넌트 디렉터리에서 사용자 계정 이름을 검색한 다음 일치하는 모든 사용자의 포털 데이터를 지웁니다.

게스트 디렉터리에서 포털 사용자 데이터 지우기

이 시나리오에서는 Azure Stack Hub 운영자가 사용자가 있는 게스트 디렉터리에 액세스할 수 없습니다. CSP(클라우드 솔루션 공급자)인 경우 일반적인 시나리오입니다.

Azure Stack Hub 운영자가 포털 사용자 데이터를 제거하려면 최소한 사용자 개체 ID가 필요합니다.

사용자는 개체 ID를 쿼리하고 Azure Stack Hub 운영자에게 제공해야 합니다. 연산자는 사용자가 있는 디렉터리에 액세스할 수 없습니다.

사용자가 사용자 개체 ID를 검색합니다.

  1. 관리자 권한 Windows PowerShell 세션을 열고(관리자 권한으로 실행) AzureStack-Tools-az 디렉터리의 루트 폴더로 이동한 다음 필요한 PowerShell 모듈을 가져옵니다.

    Import-Module .\DatacenterIntegration\Portal\PortalUserDataUtilities.psm1
    
  2. 다음 명령을 실행합니다. 자리 표시자를 사용자 환경과 일치하는 값으로 대체해야 합니다.

    ## The following Azure Resource Manager endpoint is for the ASDK. If you are in a multinode environment, contact your operator or service provider to get the endpoint.
    $userARMEndpoint = "https://management.local.azurestack.external"
    
    ## Replace the following value with the directory tenant ID, which contains the user account.
    $userDirectoryTenantId = "3160cbf5-c227-49dd-8654-86e924c0b72f"
    
    ## Replace the following value with the name of the user principal whose portal user data is to be cleared.
    $userPrincipleName = "myaccount@contoso.onmicrosoft.com"
    
    Get-UserObjectId -DirectoryTenantId $userDirectoryTenantId `
     -AzsArmEndpoint $userARMEndpoint `
     -UserPricinpalName $userPrincipleName
    

    참고

    사용자는 이전 스크립트의 출력인 사용자 개체 ID를 Azure Stack Hub 연산자에 제공해야 합니다.

Azure Stack Hub 운영자가 포털 사용자 데이터를 제거합니다.

Azure Stack Hub 연산자로 사용자 개체 ID를 받은 후 다음 명령을 실행하여 포털 사용자 데이터를 제거합니다.

  1. 관리자 권한 Windows PowerShell 세션을 열고(관리자 권한으로 실행) AzureStack-Tools-az 디렉터리의 루트 폴더로 이동한 다음 필요한 PowerShell 모듈을 가져옵니다.

    Import-Module .\DatacenterIntegration\Portal\PortalUserDataUtilities.psm1
    
  2. 다음 명령을 실행하여 환경과 일치하도록 매개 변수를 조정해야 합니다.

    ## The following Azure Resource Manager endpoint is for the ASDK. If you are in a multinode environment, contact your operator or service provider to get the endpoint.
    $AzsAdminARMEndpoint = "https://adminmanagement.local.azurestack.external"
    
    ## Replace the following value with the Azure Stack Hub directory tenant ID.
    $AzsAdminDirectoryTenantId = "f5025bf2-547f-4b49-9693-6420c1d5e4ca"
    
    ## Replace the following value with the directory tenant ID of the user to clear.
    $DirectoryTenantId = "3160cbf5-c227-49dd-8654-86e924c0b72f"
    
    ## Replace the following value with the name of the user principal whose portal user data is to be cleared.
    $userObjectID = "s-1-*******"
    Clear-AzsUserDataWithUserObject -AzsAdminArmEndpoint $AzsAdminARMEndpoint `
     -AzsAdminDirectoryTenantId $AzsAdminDirectoryTenantId `
     -DirectoryTenantID $DirectoryTenantId `
     -UserObjectID $userObjectID `
    

다음 단계