Hi all,
I'm trying to authenticate to the Content Server REST API using the OTDS OAuth2 token exchange flow (client credentials → impersonate a user → access Content Server). I've done a lot of research and testing but I'm stuck on a persistent error and would appreciate any guidance.
Goal:
Use an OAuth2 service account to get a user-scoped token for Content Server without authenticating directly with a username and password.
Environment:
- OTDS: otds.yourcompany.com
- Content Server: otcs.yourcompany.com
- Content Server Resource ID: YOUR-RESOURCE-ID (retrieved via ?func=otdsintegration.getresourceid)
What works:
- Step 1 — Getting a client credentials token from OTDS works fine
- Step 2 — Token exchange without the resource scope returns a token successfully
- Direct Content Server auth with username and password works fine
What fails:
Token exchange with resource scope returns: "User cannot be impersonated in resource Content Server"
Token exchange request:
POST /otdsws/oauth2/token
grant_type=urn:ietf:params:oauth:grant-type:token-exchange
requested_token_type=urn:ietf:params:oauth:token-type:access_token
client_id=my-oauth-client
client_secret=***
subject_token=testuser@yourcompany.com
subject_token_type=urn:opentext.com:oauth:string:user_id
scope=resource:YOUR-RESOURCE-ID
Everything I've configured in OTDS:
- OAuth client: Allow Impersonation = enabled, Confidential = enabled
- Access Role "Access to Content Server": user partition added, user added explicitly, Content Server resource added
- Content Server resource Impersonation Settings: "Allow this resource to impersonate users" = checked
- Tried OAuth client partition set to Global, user-specific partition, and non-sync partition — same error each time
Question:
Is there something on the Content Server side that also needs to be configured to allow OTDS impersonation? Or is there another OTDS setting I'm missing? Any guidance appreciated!