Skip to content

Instantly share code, notes, and snippets.

@Zazcallabah
Created October 17, 2018 09:12
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 Zazcallabah/df54db7d5187d5212812a8e3b887e584 to your computer and use it in GitHub Desktop.
Save Zazcallabah/df54db7d5187d5212812a8e3b887e584 to your computer and use it in GitHub Desktop.
Enable fiddler MITM for Azure CLI 2
#this script probably needs to be run as admin
#also, openssl is required
#also, you need to export the fiddler root cert to desktop
$out = "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\certifi\cacert.pem"
mv $out "$out.old"
$in = "$($env:USERPROFILE)\Desktop\FiddlerRoot.cer"
& "$PSScriptRoot\bin\openssl.exe" x509 -inform der -in $in -out $out
$env:ADAL_PYTHON_SSL_NO_VERIFY = 1
$env:AZURE_CLI_DISABLE_CONNECTION_VERIFICATION = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment