Skip to content

Instantly share code, notes, and snippets.

@mattruma mattruma/Authenticate.ps1 Secret
Last active Apr 30, 2020

What would you like to do?
param (
If ($Tenant.Trim() -eq "" ) {
$Tenant = Read-Host -Prompt "Enter your FIRST part of your tenant name, e.g. if your tenant was, just enter microsoft"
If ($Tenant.Trim() -eq "" ) {
Throw "Tenant is required, either enter as a prompt or provide a value for the -Tenant argument"
Connect-AzAccount -Tenant "$($Tenant)"
az login --tenant "$($Tenant)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.