'OneLogin access token missing "sub" claim on client_credentials

Testing OneLogin access token through OAUTH2 "Client_Credentials" workflow. The steps I followed are;

  1. Add the authorization server
  2. Linked the Authorization server to OIDC app
  3. Even tried to add below claim mapping to the authorization server
{
    "name": "sub",
    "user_attribute_mappings": "azp"
}

Still "sub" claim is not showing up, the only claims i see are below. I want "azp" and "sub" to have the same value.

{
  "jti": "c7a3hjsYatSDxuGV7W68H",
  "iss": "https://xxxxx-dev.onelogin.com/oidc/2",
  "iat": 1652231902,
  "exp": 1652232802,
  "aud": [
    "https://example.com/todo",
    "https://example.com/other_service"
  ],
  "azp": "6xxxxx-axxx-0xxx-6xx-0xxxxxxxx12"
}

Any idea why? In Okta & keycloak I always get "sub" claim from the access token on "client_credentials" workflow.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source