Crynners / AccBot

AccBot is an open-source accumulation bot that incrementally purchases BTC based on a DCA strategy to accumulate your portfolio
MIT License
27 stars 14 forks source link

Fix "az login" when MFA is activated #16

Open pierrediancourt opened 3 years ago

pierrediancourt commented 3 years ago

Hey, Thanks for open sourcing this project !

I just want to give some feedback on its usage, i'll let you decide what to do with that (addition to doc, change of code...).

The line 130 of the install_script.ps1 should have a --tenant parameter added for the script to run successfully when using an azure account with the MFA activated.
Which gives this : $LoginResult = az login --allow-no-subscriptions --tenant "TENANTID" --only-show-errors | ConvertFrom-Json

Source that helped me find this fix : https://github.com/Azure/azure-cli/issues/6962#issuecomment-854839923

How to find the value to replace "TENANTID"
image Use the guid under Directory ID as shown on the screenshot.

Crynners commented 2 years ago

Hello Pierre, thank you very much for sending us feedbacks. It would be great to put this information in the initial README file to the FAQ section. If you'd like, you can suggest the change in the form of a pull request, or we'll sort this out within the next few weeks.

Regards, Crynners