robinsmidsrod / unifi-controller-cli

UniFi controller CLI for API
MIT License
34 stars 2 forks source link

Support for UI.com account with MFA? #1

Open rsnodgrass opened 2 years ago

rsnodgrass commented 2 years ago

Does this support accounts which are setup with multi-factor authentication (MFA or 2FA)? I can't seem to get this to connect to the controller, but if I click on the link emitted in the logs it does load in the browser and shows json data. My guess is that this does not take the 6-digit multi-factor authentication token?

robinsmidsrod commented 2 years ago

Indeed, it does not support MFA. Do you have any information on how to authenticate API requests with MFA enabled?

rsnodgrass commented 2 years ago

No, but I’ll do some research!!

On Nov 24, 2021 at 2:52 AM, <Robin Smidsrød @.***)> wrote:

Indeed, it does not support MFA. Do you have any information on how to authenticate API requests with MFA enabled?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/robinsmidsrod/unifi-controller-cli/issues/1#issuecomment-977759417), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAQY4XD2UZL6CCPCZZEMXLLUNS7VZANCNFSM5IVXBIFA).

rsnodgrass commented 2 years ago

What I've found is that the recommendation is to create another "Local User" on the controller that does not have MFA activated. This account is used explicitly for API access.

robinsmidsrod commented 2 years ago

Yup, this is what I seem to recall as well, when I did some research about it way-back-when. I guess that means we can close this issue?

rsnodgrass commented 2 years ago

I think so. Now, I can't get Net::SSLeay to actually install on the Mac that I use all the time. :(