Get custom claims from access token while login to Okta via IdP using SAML2

I have created integration with IdP provider. Then configured rule for that IdP. After trying to login to Okta, then I redirected to IdP. Log in to IdP and then redirected and successfully log in to Okta. I can get access token from local storage and parse it. Then I do not see custom claims which I added in authorization server. I am using IdP with protocol SAML2. How can I customize access token for my needs ? I know about authorization server and custom claims, but I checked in logs that user was created using requests /oauth2/token that not include {authorizationServerId} in path.

If you created custom claims on a custom authorization server, the user/application needs to make requests to this server, ala /oauth2/{{authorizationServerId}}/v1/token. Otherwise, you are getting tokens back from the Org Authorization Server, which will never contain these custom claims.

Details about the different authorization server types: Authorization Servers | Okta Developer

Where can I configured that my app should authorize via /oauth2/{{authorizationServerId}}/v1/token ? Now in user creation logs I see that user was created from SAML assertions using /oauth2/v1/authorize to get authorization code and then oauth2/v1/token to get ID and access token via authorization code flow.

I’m not sure I follow how your application is configured or what is making the OIDC calls, so I do not know where you would configure this on your side.

Whatever portion of your integration makes the /authorize and /token requests would need to use the custom server you configured. In some cases, this setting may be as simple as setting an issuer value to https://org.okta.com/oauth2/default