Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Virtual Desktop basicscale.ps1 does not work with user assigned or managed identities #740

Closed
al-lac opened this issue Mar 13, 2023 · 0 comments · Fixed by #763
Closed
Assignees

Comments

@al-lac
Copy link

al-lac commented Mar 13, 2023

Azure Run as accounts will be retired on September 30 2023. The script basicScale.ps1 will not work anymore from this point on.

Support for user assigned and managed identities is needed until then.

I got it working with managed identities by the "region azure auth, ctx" with the following:

	#region azure auth, ctx

	if (!$SkipAuth) {
		# Azure auth
		$AzContext = $null
		try {
			$AzAuth = Connect-AzAccount -Identity
			if (!$AzAuth -or !$AzAuth.Context) {
				throw $AzAuth
			}
			$AzContext = $AzAuth.Context
		}
		catch {
			throw [System.Exception]::new('Failed to authenticate Azure with managed identity', $PSItem.Exception)
		}
		Write-Log "Successfully authenticated with Azure using managed identity: $($AzContext | Format-List -Force | Out-String)"
	}

	#endregion`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants