# Switch user organization with out re-login in asp.net Core

**URL:** <https://community.auth0.com/t/switch-user-organization-with-out-re-login-in-asp-net-core/115757>\
**Category:** Get Help\
**Tags:** login-prompt-new-experience, login-experience\
**Created:** [September 8, 2023, 11:18am UTC](https://community.auth0.com/t/switch-user-organization-with-out-re-login-in-asp-net-core/115757 "2023-09-08T11:18:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahtashamkamal223344](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ahtashamkamal223344/32/12736_2.png) [@ahtashamkamal223344](https://community.auth0.com/u/ahtashamkamal223344)\
**Post date:** [September 8, 2023, 11:18am UTC](https://community.auth0.com/t/switch-user-organization-with-out-re-login-in-asp-net-core/115757/1 "2023-09-08T11:18:45Z")

</div>

I am encountering an issue during a silent login attempt, despite having provided all the relevant information. An error is still being returned.

`var client = new RestClient($"{_options.Domain}/authorize?response_type=id_token token&client_id={_options.ClientId}&redirect_uri=https://localhost:44304&state=STATE&scope=openid profile email offline_access&nonce={nonce}&audience={_options.Audience}&response_mode=form_post&prompt=none&organization={organisatoinId}");`

Furthermore, the return status code is “OK,” but upon inspecting the content, an error is displayed in HTML format. This is contradictory to the documentation, which clearly states that a redirect URL should be returned instead.

`<html><head><title>Submit This Form</title><meta http-equiv="X-UA-Compatible" content="IE=edge"></head><body onload="javascript:document.forms[0].submit()"><form method="post" action="https://localhost:44304"><input type="hidden" name="error" value="login_required"/><input type="hidden" name="error_description" value="Login required"/><input type="hidden" name="state" value="STATE"/></form></body></html>`

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [September 26, 2023, 5:14pm UTC](https://community.auth0.com/t/switch-user-organization-with-out-re-login-in-asp-net-core/115757/2 "2023-09-26T17:14:41Z")

</div>

Hi @ahtashamkamal223344

Thanks for getting in touch with us at Auth0 Community.

I think the issue here could be your use of [RestSharp](https://restsharp.dev/). The [/authorize](https://auth0.com/docs/api/authentication?http#authorize-application) endpoint needs to be redirected to as it is an interactive endpoint, this will then fire our hosted Universal Login page.

Have you seen our quickstarts on how you might implement this e.g. [https://auth0.com/docs/quickstart/webapp/aspnet-core](https://auth0.com/docs/quickstart/webapp/aspnet-core)

There are some organization specific examples here too [https://github.com/auth0/auth0-aspnetcore-authentication/blob/main/EXAMPLES.md#organizations](https://github.com/auth0/auth0-aspnetcore-authentication/blob/main/EXAMPLES.md#organizations)

Warm regards.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 10, 2023, 5:15pm UTC](https://community.auth0.com/t/switch-user-organization-with-out-re-login-in-asp-net-core/115757/3 "2023-10-10T17:15:20Z")

</div>

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