# Exchanging SAML Assertion for AuthToken in SAML 2.0 Assertion Flow

**URL:** <https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310>\
**Category:** SAML\
**Created:** [November 30, 2021, 5:08pm UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310 "2021-11-30T17:08:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronnie-bs](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@ronnie-bs](https://devforum.okta.com/u/ronnie-bs)\
**Post date:** [November 30, 2021, 5:08pm UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310/1 "2021-11-30T17:08:09Z")

</div>

I am following Okta’s documentation at this link ([Implement authorization by grant type | Okta Developer](https://developer.okta.com/docs/guides/implement-grant-type/saml2assert/main/#set-up-your-app)) to setup an application that uses the SAML 2.0 Assertion Flow. The instructions at this link did not appear to coincide with what the AIW (Application Integration Wizard) showed for setting up an App using this flow. I was unable to obtain a ClientId and ClientSecret for this app. Apparently I need to supply a digest of the ClientId and ClientSecret in the Authorization header when I make an invocation to the Okta ‘/token’ endpoint while exchanging the SAML 2.0 Assertion that you get back for the Authentication token (and Id Token etc). If anyone has done this, please tell me the right approach for this. Thanks.

---

<div class="post-metadata">

**Author:** ![sigama](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/sigama/32/5811_2.png) [@sigama](https://devforum.okta.com/u/sigama)\
**Post date:** [November 30, 2021, 7:34pm UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310/2 "2021-11-30T19:34:15Z")

</div>

Hi @ronnie-bs! Did you also create an OIDC App as demo-ed in this [SAML Assertion Flow Sample](https://github.com/emanor-okta/saml-assertion-flow-with-okta#oidc-app-saml-assertion-oidc-flow)?

---

<div class="post-metadata">

**Author:** ![ronnie-bs](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@ronnie-bs](https://devforum.okta.com/u/ronnie-bs)\
**Post date:** [November 30, 2021, 8:54pm UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310/4 "2021-11-30T20:54:08Z")

</div>

Hi @sigama, I am using an Okta Developer Account. In that when I try to create an app, the options available for me are the following:

![image](https://global.discourse-cdn.com/oktadev/original/2X/a/a4ae29bd6ff7e3e48c418f937568eaa729c492d0.png)

And if I choose the OIDC option, the Grant Types available for me are only:

![image](https://global.discourse-cdn.com/oktadev/original/2X/d/d18720d2815903553d4e0f1fc27dd8dff1e60232.png)

I do not see the ‘SAML 2.0’ option in the grant type as can be seen in the link you have shared. Wonder if it is because I am in a Developer Okta Account?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [November 30, 2021, 11:13pm UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310/5 "2021-11-30T23:13:20Z")

</div>

If you create a Native OIDC app, do you see the option available?

---

<div class="post-metadata">

**Author:** ![ronnie-bs](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@ronnie-bs](https://devforum.okta.com/u/ronnie-bs)\
**Post date:** [December 1, 2021, 12:09am UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310/6 "2021-12-01T00:09:45Z")

</div>

@Andrea, Yes I see the option for SAML 2.0 and Refresh Token Grant Types along with Client Authentication performed through authCode w/ PKCE. Thank you so much. It would be great if you could update the documentation [here](https://developer.okta.com/docs/guides/implement-grant-type/saml2assert/main/) for the benefit of other readers in the future. Thank you

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [December 1, 2021, 12:21am UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310/7 "2021-12-01T00:21:02Z")

</div>

It should be possible to configure a different app type with that [grant type](https://developer.okta.com/docs/reference/api/apps/#settings-10) via API, but this appears to be a limitation in the UI, which I’ll look into.

---

<div class="post-metadata">

**Author:** ![ronnie-bs](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@ronnie-bs](https://devforum.okta.com/u/ronnie-bs)\
**Post date:** [December 1, 2021, 12:32am UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310/8 "2021-12-01T00:32:03Z")

</div>

Ok @Andrea, thank you again.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 8, 2024, 8:08pm UTC](https://devforum.okta.com/t/exchanging-saml-assertion-for-authtoken-in-saml-2-0-assertion-flow/18310/9 "2024-02-08T20:08:21Z")

</div>

Closed on February 8, 2024, 8:08pm UTC


