now-cli login giving me unauthorized for confirmed credentials
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 04:49 AM
Following all steps on https://developer.servicenow.com/dev.do#!/guides/orlando/now-experience/cli/getting-started, I have now-cli working, but I cannot login to any instance using the admin credentials I know work just fine:
```
$ node --version
v12.16.1
$ now-cli --version
Now CLI @17.0.3
$ now-cli login --host https://xxxx.service-now.com --method basic --username admin --password yyyy
✖ Connection to 'https://xxxx.service-now.com' failed. Credentials not saved.
Response code 401 (Unauthorized)
login [host] [method] [username] [password]
Login to a glide instance.
```
Is any config required on the instance level to get now-cli logins work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2020 07:48 AM
Do you happen to have Multi-factor authentication turned on for the instance? MFA seems to break the now-cli login and you have to turn it off temporarily to deploy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2020 08:04 AM
Thanks for replying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2020 07:57 PM
Hello
I came across the same issue. now cli throws me an error 'Credentials are not saved' with 401 response code. However I see we have the MFA enabled. I don't think I can disable MFA for my account, as it is enabled via a system property. What would be the alternate ways to login with MFA enabled?
Any help is appreciated
Thanks
Nitin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2020 10:57 PM
HI Nitin,
Did you get any change to disable the MFA in your sys_user table. The field name in Enable Multifactor Authentication in list view.
Thanks