# Unauthorized (401) error when login into vcloud tenant

**URL:** <https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862>\
**Category:** OAuth/OIDC\
**Created:** [September 13, 2022, 6:25pm UTC](https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862 "2022-09-13T18:25:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vichu](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@vichu](https://devforum.okta.com/u/vichu)\
**Post date:** [September 13, 2022, 6:25pm UTC](https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862/1 "2022-09-13T18:25:25Z")

</div>

Hello there,

I have configured Okta OIDC with vCloud Director. I have a problem in login into the tenant portal. It throws the below error

‘’‘’‘’“”  
HTTP ERROR 401  
Problem accessing /login/oauth. Reason:

```auto
Unauthorized

```

“”“”“”  
However the okta system log shows that the " OIDC access token is granted success " . Could you suggest to resolve this error?

---

<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:** [September 13, 2022, 6:38pm UTC](https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862/2 "2022-09-13T18:38:00Z")

</div>

Do you happen to know how vCloud Director validates the token? I’m wondering if the validation they are doing is failing, resulting in the user being considered unauthorized based on the token they received.

Either the token doesn’t contain certain expected/required information for this integration, or, another possibility, the token validation itself isn’t working due to limitations such as this one: [Signature Validation Failed on Access Token | Okta Help Center](https://support.okta.com/help/s/article/Signature-Validation-Failed-on-Access-Token?language=en_US)

---

<div class="post-metadata">

**Author:** ![vichu](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@vichu](https://devforum.okta.com/u/vichu)\
**Post date:** [September 13, 2022, 8:33pm UTC](https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862/3 "2022-09-13T20:33:18Z")

</div>

I dont have an idea as to how vcloud director validates the token. I had configured okta OIDC with different vcloud version before. I am not sure why there is a problem this time. Do I need to enable/disable specific option in Okta to check whether works or not?

Just for thought. I have the same Okta account (same user email) configured with 2 different applications and each application was integrated with 2 different vcloud versions. Will that make any difference here? Should we have a dedicated user and app for every vcloud or any other app ?

---

<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:** [September 13, 2022, 8:58pm UTC](https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862/4 "2022-09-13T20:58:07Z")

</div>

No settings that I can think of on our side. If the integration has worked before, could there be something different about how this one is configured?

And its hard to say if multiple apps/vcloud versions would cause this behavior. Are you able to get more information from the vendor about what’s causing this error?

---

<div class="post-metadata">

**Author:** ![vichu](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@vichu](https://devforum.okta.com/u/vichu)\
**Post date:** [September 13, 2022, 9:04pm UTC](https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862/5 "2022-09-13T21:04:28Z")

</div>

As far as I know the configuration settings were exactly same for those two setups. I haven’t checked with vcloud team yet.

---

<div class="post-metadata">

**Author:** ![xana](https://avatars.discourse-cdn.com/v4/letter/x/3e96dc/32.png) [@xana](https://devforum.okta.com/u/xana)\
**Post date:** [September 21, 2022, 2:34pm UTC](https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862/6 "2022-09-21T14:34:37Z")

</div>

Not sure if you managed to solve this.  
This error occurs when the claims mapping between vCD and Okta is incorrect.  
Make sure that you have subject mapped correctly

---

<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 12, 2024, 10:04pm UTC](https://devforum.okta.com/t/unauthorized-401-error-when-login-into-vcloud-tenant/21862/7 "2024-02-12T22:04:36Z")

</div>

Closed on February 12, 2024, 10:04pm UTC


