Mapping Idp Id Token Claims to User prifle

I’m currently following these docs (Configure PKCE and Claim Mapping for OIDC Connections) to try and implement claim mapping for our Okta Enterprise connection.

I’ve set up the attribute map template as follows:

  "mapping_mode": "use_map",
  "attributes": {
    "chtPermissions": "${context.tokenset.cht_permissions}",

When I try to initiate a login, i see the following error in the logs dashboard:

  • Error transforming template due to missing keys (1) from IdP context

It seems as though the claims mapping only works for default id token claims, but I have a custom claim that I’d like to map over. Is it possible to get the claims mapping working for custom ID token claims. Okta renders the appropriate claims in the Id token in their token preview, so I know that they exist on the token.