Support OAuth 2.0 authentication for SDK CLI (build/install/download) #46
Replies: 3 comments
-
|
Not sure what you mean, SDK cli when adding auth aliases now inherently supports OAuth2. Thats exactly why I used the now-sdk as the base for my cli and mcp, because it inherently already used that. Its been available for a year and a half or so? You do need the IDE installed or install the update set with the application registry for it to work, but its there when you add a new alias. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the pointer! I use Could you point me to how you pass OAuth credentials in a headless/CI environment? Specifically: can an auth alias with OAuth tokens be used non-interactively for |
Beta Was this translation helpful? Give feedback.
-
|
To give more context on the architecture: The MCP server authenticates users via ServiceNow's OAuth 2.0 provider (Inbound Integration entry in the Application Registry). All Table API operations use the resulting Bearer token per-user — this works perfectly. But when I need to run |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently,
now-sdk installandnow-sdk downloadrequire Basic Auth credentials (SN_USERNAME/SN_PASSWORDenvironment variables in CI mode). This forces teams running the SDK in automated pipelines (e.g., MCP servers, CI/CD) to store a service account's username and password as secrets.Would the team consider adding OAuth 2.0 (Authorization Code or Client Credentials grant) as an authentication option for SDK CLI operations?
Use case: We run an MCP server that uses the SDK to build and deploy scoped apps to ServiceNow. The server already authenticates to the instance via OAuth 2.0 for all Table API operations. But for SDK operations (
install,download), we have to fall back to storing a service account's username/password on the server because the SDK CLI doesn't accept OAuth tokens.What this would enable:
--tokenflag orSN_OAUTH_TOKENenv var)Happy to provide more details on the integration pattern if helpful.
Beta Was this translation helpful? Give feedback.
All reactions