NOW SDK does not work with 2FA enabled?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 05:45 PM
Hello,
I wanted to try out now-sdk for developing new applications. However, company policy requires my (admin level) account to have two factor authentication. When I try the auth command, after I enter my username and password the cli command fails like so:
[now-sdk] [ERROR] Login to instance https://****.service-now.com failed: Error: Your account requires Multi-factor authentication. Please enter the 6-digit code generated by the authenticator app on your mobile device
Is there really no way to use now-sdk if the account is set up with 2FA? That sounds pretty strange to me since I dont think have 2FA on admin accounts is that rare even for non-production environments.
I am using a fairly recent (2 weeks ago?) build of the SDK on Mac.
I see no mention of 2FA on the now-sdk docs so perhaps this feature is not out yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2025 09:56 AM
I've run into this and at least in my case the easiest path around the issue was to just authenticate with the oauth flow instead of basic auth. (See https://www.servicenow.com/community/servicenow-ide-sdk-and-fluent/configuring-servicenow-sdk-for-oa...)