Integrate OIDC Application(A) to IdP initiated application (B)

Hi all,
I’m new to Okta so please bear with me.
My scenario is as follows:
Application B: Okta SAML application to enable federated authentication with a 3rd party application.
User is provided with a link(X), if successfully authenticated, user is redirected to 3rd party application with SAML assertion. Successful redirect open the 3rd party application. 3rd party applicaiton also provide REST APIs for data retrieval.
Application A(our): Okta application for a JVM based client. setup as OIDC (but can be changed)

Use case: User logs in Application A. Application A needs to retrieve data from 3rd party via REST APIs. Since user is already logged in, we do not want to prompt user to enter credentials again.

Question: how can we retrieve data from application B via APIs?
tried: Oauth ‘Authorize code’ flow with application A. JVM get access_token and id_token but they can’t be user with link X.

Any help is appreciated.

*edit: made correction to show correct calling application.

I’m a little confused.

Are you Application B trying to pull information from an API for Application A?

Or are you Application A trying to pull information from an API for Application A, but wants to be able to SSO to Application B

but they can’t be user with link X

That statement is the bit that confuses me

My bad.
I’ll try to make it less confusing.

We want application A to retrieve data from Application B using APIs from B.

A is a JVM based traditional web application (on prem).
B is a cloud based 3rd party application.
Okta tenent are different for both application.

Current integration between A and B is ‘IdP initiated SAML flow’.

Please let me know f you need more information. As I said I’m a newb on this topic so any help is welcome.