<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/mastering-authentication-in-watsonx-orchestrate-abhvqsz1h" -->

---
title: Mastering Authentication in watsonx Orchestrate | daily.dev
description: A walkthrough of implementing user authentication in IBM watsonx Orchestrate agents using IBMid and IBM App ID with OIDC. The architecture involves a React...
canonical: https://daily.dev/posts/mastering-authentication-in-watsonx-orchestrate-abhvqsz1h
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Mastering Authentication in watsonx Orchestrate | daily.dev
og:description: A walkthrough of implementing user authentication in IBM watsonx Orchestrate agents using IBMid and IBM App ID with OIDC. The architecture involves a React...
og:url: https://daily.dev/posts/mastering-authentication-in-watsonx-orchestrate-abhvqsz1h
og:image: https://api.daily.dev/og/posts/AbHVQSz1H.png
og:image:alt: Mastering Authentication in watsonx Orchestrate
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Mastering Authentication in watsonx Orchestrate

**[Niklas Heidloff](https://daily.dev/sources/heidloff)** · 5 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of implementing user authentication in IBM watsonx Orchestrate agents using IBMid and IBM App ID with OIDC. The architecture involves a React frontend with an embedded chat widget, a Node.js backend that generates JWTs, and agent tools that verify authentication by checking for a valid SSO token in the AgentRun context or calling the App ID /userinfo endpoint. Code snippets show how tools access the sso_token and roles from the request context, and a debug utility is provided to inspect runtime context. The setup supports two identity providers: IBMid for real users and a built-in cloud directory user for negative testing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://heidloff.net/article/watsonx-orchestrate-authentication>

## Questions this post answers

### How do I access the SSO token inside a watsonx Orchestrate agent tool?

Inside a watsonx Orchestrate tool, the SSO token is available via the AgentRun context object. Retrieve it with `context.request_context.get('sso_token', '')`. The Node.js backend embeds the App ID access token into the JWT under the `context.sso_token` field when creating the session JWT, and Orchestrate injects this into the tool's runtime context automatically.

_Developers wiring up enterprise auth in Orchestrate agents track patterns like this on daily.dev._

### How can a watsonx Orchestrate agent tool verify user roles using IBM App ID?

A tool can verify user roles in two ways: by reading the `roles` field directly from `context.request_context` (injected via the JWT created by the Node.js backend), or by calling the App ID `/userinfo` endpoint with the sso_token as a Bearer token. The /userinfo endpoint returns user identity and assigned roles, and returns HTTP 200 on success.

_Teams choosing between JWT-embedded roles and live /userinfo calls for Orchestrate agents find the trade-offs discussed on daily.dev._

## Similar posts on daily.dev

- [Connecting Custom Apps to Orchestrate via REST APIs](https://daily.dev/posts/connecting-custom-apps-to-orchestrate-via-rest-apis-ca7p3jero) · Niklas Heidloff · 0 upvotes · 0 comments
- [User Accountability in agentic watsonx Orchestrate Apps](https://daily.dev/posts/user-accountability-in-agentic-watsonx-orchestrate-apps-4zayijrqr) · Niklas Heidloff · 0 upvotes · 0 comments
- [Passing User Identity safely across Agents and Enterprise Systems](https://daily.dev/posts/passing-user-identity-safely-across-agents-and-enterprise-systems-olnhxffga) · Niklas Heidloff · 1 upvotes · 0 comments
- [Authenticating Enterprise Agents in watsonx Orchestrate](https://daily.dev/posts/authenticating-enterprise-agents-in-watsonx-orchestrate-77kgnffo2) · Niklas Heidloff · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#authentication](https://daily.dev/tags/authentication)

[View this post on daily.dev](https://daily.dev/posts/mastering-authentication-in-watsonx-orchestrate-abhvqsz1h)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Mastering Authentication in watsonx Orchestrate","url":"https://daily.dev/posts/mastering-authentication-in-watsonx-orchestrate-abhvqsz1h","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/mastering-authentication-in-watsonx-orchestrate-abhvqsz1h"},"datePublished":"2026-08-10T15:21:41.607Z","dateModified":"2026-08-10T15:22:24.268Z","description":"A walkthrough of implementing user authentication in IBM watsonx Orchestrate agents using IBMid and IBM App ID with OIDC. The architecture involves a React...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/499e18e1d34f678325033f94e6bff131?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/499e18e1d34f678325033f94e6bff131?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Niklas Heidloff","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Niklas Heidloff","logo":"https://media.daily.dev/image/upload/s--1T53PJFj--/f_auto/v1743317445/logos/heidloff","url":"https://daily.dev/sources/heidloff"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/mastering-authentication-in-watsonx-orchestrate-abhvqsz1h","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,authentication","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Niklas Heidloff","item":"https://daily.dev/sources/heidloff"},{"@type":"ListItem","position":3,"name":"Mastering Authentication in watsonx Orchestrate"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/mastering-authentication-in-watsonx-orchestrate-abhvqsz1h#faq","mainEntity":[{"@type":"Question","name":"How do I access the SSO token inside a watsonx Orchestrate agent tool?","acceptedAnswer":{"@type":"Answer","text":"Inside a watsonx Orchestrate tool, the SSO token is available via the AgentRun context object. Retrieve it with `context.request_context.get('sso_token', '')`. The Node.js backend embeds the App ID access token into the JWT under the `context.sso_token` field when creating the session JWT, and Orchestrate injects this into the tool's runtime context automatically. Developers wiring up enterprise auth in Orchestrate agents track patterns like this on daily.dev."}},{"@type":"Question","name":"How can a watsonx Orchestrate agent tool verify user roles using IBM App ID?","acceptedAnswer":{"@type":"Answer","text":"A tool can verify user roles in two ways: by reading the `roles` field directly from `context.request_context` (injected via the JWT created by the Node.js backend), or by calling the App ID `/userinfo` endpoint with the sso_token as a Bearer token. The /userinfo endpoint returns user identity and assigned roles, and returns HTTP 200 on success. Teams choosing between JWT-embedded roles and live /userinfo calls for Orchestrate agents find the trade-offs discussed on daily.dev."}}]}
```

