2016-11-30 2 views
0

, 나는 내 푸른 계정에 모든 권한을 가지고 있음을 감안할 때비주얼 스튜디오 팀 서비스 해제 문제를 내가 비주얼 스튜디오 내에서 자료를 만들려고 할 때

enter image description here

푸른이 오류 배포

로 실행 그리고 나는 푸른 색 세션에 로그인하는 데 아무런 문제가 없다.

나는 이것이 VSTS 내의 버그라고 생각한다. 질문은이 상황을 어떻게 조정할 것인가?

Rem : 주체 ID, 임차인 ID 등의 정보를 얻기 위해 powershell을 사용하는 이전 방법을 시도했지만이 방법은 비주얼 스튜디오 2013 용 릴리스 관리 도구를 임시로 사용할 수 있습니까? 그것은이 작동

+0

가 PowerShell 스크립트를 통해 프린시^ID, 세입자의 ID를 얻기의 결과 무엇인가 (this 문서를 참조) 직접 PowerShell 스크립트를 실행해야 수동으로 ADD의 지원 응용 프로그램을 구성 할 필요가 없습니다 Azure Resource Manager Service Endpoint를 추가 하시겠습니까? –

+0

주 ID가 비어 있습니다. – user2050269

+0

"Azure RM Subscription"필드의 등록 ID가 수동으로 입력 되었습니까? –

답변

1

내 응용 프로그램은 우리의 상황에 대한 경우와 둘째,이 방법은 어떤 도움은 매우

을 이해할 수있을 것이다 지금

을 위해 사용되지 않는 건가요하지 않은 AAD으로 백업 할 수있다 필요가 있음을 감사합니다 나를 위해 좋은. (인증 버튼을 클릭하여 Azure 서비스 연결을 성공적으로 구성).

인터넷 브라우저 캐시를 지운 다음 InPrivate 브라우징 시작을 다른 컴퓨터에서 시도 할 수 있습니다.

는 "나는 그렇게 원금 ID, 세입자 ID와에 대한 정보를 얻을 수 PowerShell을 사용하는 기존의 방법을 시도했지만이 방법은 내 응용 프로그램은 우리의 상황의 경우에는 해당되지 않습니다되는 AAD으로 백업 할 것을 필요

당신은

param 
(
    [Parameter(Mandatory=$true, HelpMessage="Enter Azure Subscription name. You need to be Subscription Admin to execute the script")] 
    [string] $subscriptionName, 

    [Parameter(Mandatory=$true, HelpMessage="Provide a password for SPN application that you would create")] 
    [string] $password, 

    [Parameter(Mandatory=$false, HelpMessage="Provide a SPN role assignment")] 
    [string] $spnRole = "owner" 
) 

#Initialize 
$ErrorActionPreference = "Stop" 
$VerbosePreference = "SilentlyContinue" 
$userName = $env:USERNAME 
$newguid = [guid]::NewGuid() 
$displayName = [String]::Format("VSO.{0}.{1}", $userName, $newguid) 
$homePage = "http://" + $displayName 
$identifierUri = $homePage 


#Initialize subscription 
$isAzureModulePresent = Get-Module -Name AzureRM* -ListAvailable 
if ([String]::IsNullOrEmpty($isAzureModulePresent) -eq $true) 
{ 
    Write-Output "Script requires AzureRM modules to be present. Obtain AzureRM from https://github.com/Azure/azure-powershell/releases. Please refer https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/DeployAzureResourceGroup/README.md for recommended AzureRM versions." -Verbose 
    return 
} 

Import-Module -Name AzureRM.Profile 
Write-Output "Provide your credentials to access Azure subscription $subscriptionName" -Verbose 
Login-AzureRmAccount -SubscriptionName $subscriptionName 
$azureSubscription = Get-AzureRmSubscription -SubscriptionName $subscriptionName 
$connectionName = $azureSubscription.SubscriptionName 
$tenantId = $azureSubscription.TenantId 
$id = $azureSubscription.SubscriptionId 


#Create a new AD Application 
Write-Output "Creating a new Application in AAD (App URI - $identifierUri)" -Verbose 
$azureAdApplication = New-AzureRmADApplication -DisplayName $displayName -HomePage $homePage -IdentifierUris $identifierUri -Password $password -Verbose 
$appId = $azureAdApplication.ApplicationId 
Write-Output "Azure AAD Application creation completed successfully (Application Id: $appId)" -Verbose 


#Create new SPN 
Write-Output "Creating a new SPN" -Verbose 
$spn = New-AzureRmADServicePrincipal -ApplicationId $appId 
$spnName = $spn.ServicePrincipalName 
Write-Output "SPN creation completed successfully (SPN Name: $spnName)" -Verbose 


#Assign role to SPN 
Write-Output "Waiting for SPN creation to reflect in Directory before Role assignment" 
Start-Sleep 20 
Write-Output "Assigning role ($spnRole) to SPN App ($appId)" -Verbose 
New-AzureRmRoleAssignment -RoleDefinitionName $spnRole -ServicePrincipalName $appId 
Write-Output "SPN role assignment completed successfully" -Verbose 


#Print the values 
Write-Output "`nCopy and Paste below values for Service Connection" -Verbose 
Write-Output "***************************************************************************" 
Write-Output "Connection Name: $connectionName(SPN)" 
Write-Output "Subscription Id: $id" 
Write-Output "Subscription Name: $connectionName" 
Write-Output "Service Principal Id: $appId" 
Write-Output "Service Principal key: <Password that you typed in>" 
Write-Output "Tenant Id: $tenantId" 
Write-Output "***************************************************************************" 
+0

내가 TenantId를 얻었을 때, 출력은 *******입니다. 이것은 로그에 어떻게 나타나는지, 실제로 var에 저장되어있는 것입니까? – m1nkeh

+0

@ m1nkeh 아니요, 실제 값이어야합니다. Windows Powershell에서 실행합니까? –

+0

은 $ var.length를 수행했으며 32로 돌아 왔으므로 로그에서 값을 숨기는 것은 VSTS라고 가정합니다.이 코드를 내 ARM 템플릿에 전달하고 작동하는지 확인합니다! :디 – m1nkeh