# The issuer and subject claim for client\_assertion is invalid because the client does not have a client secret

**URL:** <https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141>\
**Category:** Questions\
**Created:** [October 1, 2020, 5:49am UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141 "2020-10-01T05:49:09Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![fordevelopment2019](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fordevelopment2019](https://devforum.okta.com/u/fordevelopment2019)\
**Post date:** [October 1, 2020, 5:49am UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/1 "2020-10-01T05:49:09Z")

</div>

I have created app using steps mentioned at :

> **[Create a service app and grant scopes | Okta Developer](https://developer.okta.com/docs/guides/implement-oauth-for-okta-serviceapp/create-serviceapp-grantscopes/)**

App is created successfully but app doesn’t have client secret when I check that on okta dashboard.

Now I followed the steps mentioned at [https://developer.okta.com/docs/guides/implement-oauth-for-okta-serviceapp/get-access-token/](https://developer.okta.com/docs/guides/implement-oauth-for-okta-serviceapp/get-access-token/)

it fails with following error:  
Error:

{  
“error”: “invalid\_client”,  
“error\_description”: “The issuer and subject claim for client\_assertion is invalid because the client does not have a client secret.”  
}

---

<div class="post-metadata">

**Author:** ![dzeller](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dzeller/32/2790_2.png) [@dzeller](https://devforum.okta.com/u/dzeller)\
**Post date:** [October 1, 2020, 5:55pm UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/2 "2020-10-01T17:55:47Z")

</div>

Take a look at the “alg” claim in the header of the client\_assertion jwt that you are passing to the /token endpoint. I suspect that you are probably using a HMAC signing algorithm (HS\*), rather than a private-key based algorithm like RS256.

---

<div class="post-metadata">

**Author:** ![fordevelopment2019](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fordevelopment2019](https://devforum.okta.com/u/fordevelopment2019)\
**Post date:** [October 2, 2020, 1:17am UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/3 "2020-10-02T01:17:48Z")

</div>

Here is screen shot for my test project

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

---

<div class="post-metadata">

**Author:** ![dzeller](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dzeller/32/2790_2.png) [@dzeller](https://devforum.okta.com/u/dzeller)\
**Post date:** [October 2, 2020, 5:31pm UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/4 "2020-10-02T17:31:52Z")

</div>

Those are the signing keys that you intend to use to sign your client\_assertion token. You need to look at the actual token being provided in the token request being made to Okta.

---

<div class="post-metadata">

**Author:** ![fordevelopment2019](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fordevelopment2019](https://devforum.okta.com/u/fordevelopment2019)\
**Post date:** [October 5, 2020, 5:21am UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/5 "2020-10-05T05:21:45Z")

</div>

When I am making following request for gettoken, i am getting error: [The issuer and subject claim for client\_assertion is invalid because the client does not have a client secret]

```auto
curl -X POST "https://{yourOktaDomain}/oauth2/v1/token"
    -H "Accept: application/json"
    -H "Content-Type: application/x-www-form-urlencoded"
    -d "grant_type=client_credentials \
    &scope=okta.users.read \
    &client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \
    &client_assertion=eyJhbGciOiJSUzI1…..feCJfSqsJeEKGjJqp1accnXpPbCSi1-2UQ"

```

---

<div class="post-metadata">

**Author:** ![gpadma](https://avatars.discourse-cdn.com/v4/letter/g/858c86/32.png) [@gpadma](https://devforum.okta.com/u/gpadma)\
**Post date:** [October 6, 2020, 11:46pm UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/6 "2020-10-06T23:46:53Z")

</div>

Hi @fordevelopment2019,

Could you please email to [developers@okta.com](mailto:developers@okta.com) with the details so that one of our Engineers can help you with further troubleshooting ?

---

<div class="post-metadata">

**Author:** ![dev\_active](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dev\_active](https://devforum.okta.com/u/dev_active)\
**Post date:** [November 30, 2020, 1:02am UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/8 "2020-11-30T01:02:12Z")

</div>

I understand one of the engineers would respond via email but it would be great if you could post the issue & resolution in this thread. It will be helpful for others when they face similar issues

---

<div class="post-metadata">

**Author:** ![ariel.mendoza](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@ariel.mendoza](https://devforum.okta.com/u/ariel.mendoza)\
**Post date:** [February 1, 2021, 12:20am UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/9 "2021-02-01T00:20:20Z")

</div>

Is there any update on this issue?, I’m facing exactly the same behaviour

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [February 2, 2021, 1:11am UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/10 "2021-02-02T01:11:46Z")

</div>

Hello,  
I recommend starting a new post so you can provide your details of the call you are making and the response you get back. One thing you might try is change the Curl command (if you are using it), because sometimes using ‘-d’ can get messed up for with spaces and line continuations ‘’.

If this might be the issue try reformatting to:

```
curl --location --request POST 'https://{DOMAIN}.okta.com/oauth2//v1/token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'redirect_uri=http://whatever.u.have.setup' \
--data-urlencode 'scope=okta.users.read' \
--data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
--data-urlencode 'client_assertion=eyJhbG..HA'
```

---

<div class="post-metadata">

**Author:** ![sureshvytla](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sureshvytla](https://devforum.okta.com/u/sureshvytla)\
**Post date:** [March 9, 2021, 5:31pm UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/11 "2021-03-09T17:31:13Z")

</div>

Hi, Any update on this issue, I’m also having the same issue. My use case is, need to access users and groups using the client credentials.

---

<div class="post-metadata">

**Author:** ![limak111](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@limak111](https://devforum.okta.com/u/limak111)\
**Post date:** [March 1, 2022, 7:47pm UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/12 "2022-03-01T19:47:19Z")

</div>

Hi, I’m also having the same problem. Any new leads?

---

<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:** [January 19, 2024, 1:00am UTC](https://devforum.okta.com/t/the-issuer-and-subject-claim-for-client-assertion-is-invalid-because-the-client-does-not-have-a-client-secret/11141/13 "2024-01-19T01:00:39Z")

</div>

Closed on January 19, 2024, 1:00am UTC


