Use Okta credentials to login to keycloak | API to generate access token

Hey Everyone,
I’m looking to generate the access token using /protocol/openid-connect/token this endpoint for users present in okta. I configured IdP and i’m able to login via UI.

Is there any configuration in keycloak which will alog sync users from okta into keycloak?
Using IdP, password is not synced and that is why i’m unable to generate token using password. But I want user specific tokens.

I also tried to generate auth code from okta /oauth2/v1/token endpoint and used this code in keycloak token request along with grant_type as authorization_code but giving the error : “error”: “invalid_grant”, “error_description”: “Code not valid”.

How okta users can be synced with keycloak along with password?

Thanks,
Pooja