# Programmatically access other Okta-enabled apps via API

**URL:** <https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338>\
**Category:** OAuth/OIDC\
**Created:** [March 1, 2018, 4:31pm UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338 "2018-03-01T16:31:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![hshuklaOcta](https://avatars.discourse-cdn.com/v4/letter/h/4bbf92/32.png) [@hshuklaOcta](https://devforum.okta.com/u/hshuklaOcta)\
**Post date:** [March 1, 2018, 4:31pm UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/1 "2018-03-01T16:31:32Z")

</div>

I have an application I developed that uses Okta for authentication. Once a user authenticates to Okta, can I use their token to programmatically access other Okta-enabled apps via API? Our app doesn’t have UI involved so its not browser related.

What I need is, once user is authecticated to OCTA via primary authentication API and get the session token, what would be the next step or API calls which would be require to get an access of other pre-configured apps in Okta. [Salesforce.com](http://Salesforce.com) (Federated ID) app is a assigned application to Okta users.

I saw the response on [https://support.okta.com/help/answers?id=9062A000000QuZkQAK](https://support.okta.com/help/answers?id=9062A000000QuZkQAK) but couldn’t get the exact steps need to be followed. Please provide sample call or code if possible.

Thanks,  
Hemant

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [March 5, 2018, 5:27pm UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/2 "2018-03-05T17:27:04Z")

</div>

Are you trying to get an API token for Salesforce?

Or are you trying to SSO them into Salesforce?

Or are you trying to get a token for your APIs?

---

<div class="post-metadata">

**Author:** ![hshuklaOcta](https://avatars.discourse-cdn.com/v4/letter/h/4bbf92/32.png) [@hshuklaOcta](https://devforum.okta.com/u/hshuklaOcta)\
**Post date:** [March 6, 2018, 6:59am UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/3 "2018-03-06T06:59:48Z")

</div>

Hello Tom,

I am trying to get Access token from Salesforce which is generated post successful login. So if I am able to SSO into Salesfoce using API rather than browser URL, that would help.

Let me know if you need more information.

Thanks,  
Hemant

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [March 6, 2018, 7:36pm UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/4 "2018-03-06T19:36:07Z")

</div>

I’m still confused on what you are trying to do. Are you trying to make an API call on behalf of a user to Salesforce that already authenticated with Okta? Or are you trying SSO the user and get them into Salesforce.

Tell me what the end user is seeing, that might be a better way to illustrate what you are building.

---

<div class="post-metadata">

**Author:** ![hshuklaOcta](https://avatars.discourse-cdn.com/v4/letter/h/4bbf92/32.png) [@hshuklaOcta](https://devforum.okta.com/u/hshuklaOcta)\
**Post date:** [March 9, 2018, 8:29am UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/5 "2018-03-09T08:29:55Z")

</div>

“I’m still confused on what you are trying to do. Are you trying to make an API call on behalf of a user to Salesforce that already authenticated with Okta?” Yes.

end user should see the Salesforce records after authenticated with Okta.

Thanks,  
Hemant

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [March 9, 2018, 3:40pm UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/6 "2018-03-09T15:40:00Z")

</div>

> end user should see the Salesforce records after authenticated with Okta.

In Salesforce or your application?

---

<div class="post-metadata">

**Author:** ![hshuklaOcta](https://avatars.discourse-cdn.com/v4/letter/h/4bbf92/32.png) [@hshuklaOcta](https://devforum.okta.com/u/hshuklaOcta)\
**Post date:** [March 12, 2018, 6:19am UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/7 "2018-03-12T06:19:01Z")

</div>

Hello Tom,

in my application.

---

<div class="post-metadata">

**Author:** ![hshuklaOcta](https://avatars.discourse-cdn.com/v4/letter/h/4bbf92/32.png) [@hshuklaOcta](https://devforum.okta.com/u/hshuklaOcta)\
**Post date:** [March 15, 2018, 4:56pm UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/8 "2018-03-15T16:56:27Z")

</div>

> [@tom](#):
>
> Are you trying to get an API token for Salesforce?

yes that’s exactly I want.

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [March 15, 2018, 6:43pm UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/9 "2018-03-15T18:43:19Z")

</div>

There isn’t anything in Okta today to help you do this today. But you could create a service that would do this for you.

On your backend, you would use Okta and OpenID Connect to authenticate the user, then allow the user to authorize your application in Salesforce for OAuth. Once this occurs, you will be able to create a JWT bearer token for the authorize user and call the Salesforce API.

[https://help.salesforce.com/articleView?id=remoteaccess\_oauth\_jwt\_flow.htm&type=5](https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow.htm&type=5)

You would need to orchestrate this in your application though

Hope this helps,  
Tom

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 12, 2024, 9:45pm UTC](https://devforum.okta.com/t/programmatically-access-other-okta-enabled-apps-via-api/1338/10 "2024-01-12T21:45:40Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
