Skip to content

Instantly share code, notes, and snippets.

@SrDios

SrDios/login.go Secret

Created October 23, 2018 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SrDios/137f3365f557836e69835f5812d1a867 to your computer and use it in GitHub Desktop.
Save SrDios/137f3365f557836e69835f5812d1a867 to your computer and use it in GitHub Desktop.
func login() bool {
out, err := exec.Command("az", "login", "--service-principal", "-u", userid, "-p", secret, "--tenant", teenant, "--allow-no-subscriptions").Output()
if err != nil {
fmt.Printf("There was a login error: %s", out)
color.R.Printf(err.Error())
return false
}
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment