Request

Response

    Authentication Patterns

    The User Profile GraphQL API (POST /unifieduserprofile) supports Two-Legged OAuth (2LO) and Three-Legged OAuth (3LO) tokens. Choose the flow that matches where your code runs and who the token represents.

    2LO vs 3LO

    Token typeIntended useGraphQL Profile
    2LO (client credentials) Server-to-server integrations Allowed when the call is made from your backend without browser traffic indicators
    3LO (authorization code) Browser or user-facing applications Required when users interact in a browser and your app calls GraphQL Profile on their behalf

    2LO tokens represent your application, not a specific user. A 2LO token with profile read scopes can access profile data for users your service is authorized to query. That model is appropriate for backend services, not for browser code where a single application token could be exposed or reused across users.

    3LO tokens are user-delegated. Use them when your frontend, SPA, or user-facing BFF needs GraphQL Profile data in a browser context.

    For token generation, see Get a 2-legged token and Get a 3-legged token.

    Browser and user-facing flows (use 3LO)

    Use 3LO when users interact with your application in a browser and you need GraphQL Profile on their behalf.

    • Obtain a user-delegated access token through your OAuth authorization flow.
    • Call POST /unifieduserprofile with the 3LO token from the browser or from a BFF that holds the user’s session.
    • Request the custom Profile scopes your GraphQL operations need.

    Example flow:

    Browser  --(3LO token)-->  POST /unifieduserprofile
    

    Backend-for-frontend (BFF) pattern

    If your architecture uses a BFF between the browser and Profile:

    Browser  --(3LO or session)-->  BFF  --(2LO, server-side only)-->  POST /unifieduserprofile
    

    The browser authenticates to your BFF with 3LO or an established session. Your BFF calls Profile with 2LO on the server side only.

    When the BFF calls Profile with 2LO, strip browser headers from the upstream request. Do not pass through Sec-Fetch-*, Sec-CH-UA, or the client’s Origin header.

    2LO from browser or web-property traffic (blocked)

    Autodesk enforces a security control that blocks 2LO tokens used from browser or web-property traffic on GraphQL Profile.

    A request returns HTTP 403 Forbidden when all of the following are true:

    1. Endpoint: POST /unifieduserprofile (GraphQL User Profile)
    2. Auth: 2LO access token (application token with no user context)
    3. Traffic pattern: The request appears to originate from a web browser or web property — for example, presence of Sec-Fetch-* or Sec-CH-UA headers, or Origin combined with a browser-like User-Agent

    Common pitfall: header forwarding

    A backend may obtain 2LO correctly but forward browser fetch metadata (for example Sec-Fetch-Mode: cors) to Profile. That request is treated as web-property traffic and blocked.

    Fix: When your backend calls Profile with 2LO, send only the headers Profile requires (Authorization, Content-Type, optional x-correlation-id). Do not proxy browser security headers.

    Scopes do not bypass this control

    Adding OAuth scopes such as openid or additional profapi:* scopes does not resolve a 403 from this enforcement. Scope errors behave differently — see Custom Scopes and GraphQL Error Handling.

    What is not affected

    • Server-to-server 2LO on GraphQL — backend integrations that call Profile without forwarding browser security headers
    • 3LO on GraphQL — user-delegated tokens continue to work
    • OIDC UserInfo — GET /userinfo and GET /v2/userinfo (UserInfo requires 3LO; separate from this control)

    How to tell if you are impacted

    You may be affected if your application, BFF, or gateway:

    • Calls POST …/unifieduserprofile from the browser (or forwards browser Sec-Fetch-* / Origin headers upstream), and
    • Uses a 2LO token for that call

    After enforcement is enabled in your environment, expect 403 responses until you migrate.

    Migration options

    Option A — Backend-only 2LO

    Use when your service needs GraphQL Profile for arbitrary users via 2LO.

    • Call POST /unifieduserprofile only from your backend
    • Do not call Profile from the browser with 2LO
    • Do not forward browser Sec-Fetch-*, Sec-CH-UA, or client Origin headers to Profile

    Option B — 3LO for browser / user-facing GraphQL

    Use when users interact in a browser and you need GraphQL Profile.

    • Switch browser-facing flows to 3LO for POST /unifieduserprofile
    • Ensure your OAuth flow requests the Profile scopes your GraphQL operations need

    See also