# SSO for "highly trusted" desktop applications

**URL:** <https://community.auth0.com/t/sso-for-highly-trusted-desktop-applications/12069>\
**Category:** Get Help\
**Tags:** sso, login, auth0\
**Created:** [June 4, 2018, 1:30am UTC](https://community.auth0.com/t/sso-for-highly-trusted-desktop-applications/12069 "2018-06-04T01:30:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bugged](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bugged/32/10843_2.png) [@bugged](https://community.auth0.com/u/bugged)\
**Post date:** [June 4, 2018, 1:30am UTC](https://community.auth0.com/t/sso-for-highly-trusted-desktop-applications/12069/1 "2018-06-04T01:30:05Z")

</div>

I have a couple of “highly trusted client” desktop applications for which I want to implement SSO. My applications in Auth0 have the “Use Auth0 instead of the IdP to do Single Sign On” setting enabled, and my Auth0 tenant has the SSO cookie timeout set to 120 minutes.

Suppose my first application uses the following request to login a user.

```
POST {{baseUrl}}/oauth/token
{
    "grant_type": "http://auth0.com/oauth/grant-type/password-realm",
    "realm": "{{realm}}",
    "username": "{{username}}",
    "password": "{{password}}",
    "audience": "{{apiIdentifier}}",
    "client_id": "{{clientId}}"
}

```

The response contains an access token as expected, and the user record in my Auth0 tenant is updated to show a Latest Login of “a few seconds ago.”

However, what about the SSO session? Was the cookie set? Can my second application now get an access token for the user without asking the user for credentials? How would I accomplish this?

The [docs](https://auth0.com/docs/sso/current/setup#4-check-the-user-s-sso-status-from-the-application) suggest [silent authentication](https://auth0.com/docs/api-auth/tutorials/silent-authentication) using the /authorize endpoint, but I need to check the SSO session in way that does not involve redirects since these are desktop applications.

---

<div class="post-metadata">

**Author:** ![sgmeyer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgmeyer/32/3387_2.png) [@sgmeyer](https://community.auth0.com/u/sgmeyer)\
**Post date:** [June 11, 2018, 2:33pm UTC](https://community.auth0.com/t/sso-for-highly-trusted-desktop-applications/12069/2 "2018-06-11T14:33:18Z")

</div>

@bugged sorry for the late response. The grant you are using, and as implied by highly trusted client, does not support SSO. This is either a back channel login or it is a cross domain XHR. In both situations a cookie will not be set.

If you want to do cross orgin authentication and establish an SSO session/cookie with auth0 you will need to do something like this:

> **[Cross-Origin Authentication](https://auth0.com/docs/authenticate/login/cross-origin-authentication)**
>
> An explanation of cross-origin authentication in Auth0 and its compatibility with browsers

The docs suggest /authorize?prompt=none for SSO when an SSO cookie exists. The problem you are facing is caused by the authorization grant not going to issue an auth0 session cookie. So there isn’t a way to achieve SSO with auth0 when using this grant type.

---

<div class="post-metadata">

**Author:** ![bugged](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bugged/32/10843_2.png) [@bugged](https://community.auth0.com/u/bugged)\
**Post date:** [June 11, 2018, 9:09pm UTC](https://community.auth0.com/t/sso-for-highly-trusted-desktop-applications/12069/3 "2018-06-11T21:09:19Z")

</div>

Let me gather some more info and reply back. In the meantime, is there an explicit way to determine if the SSO cookie has been set for a specific user? For example, dashboard, management API, auth API, etc.

---

<div class="post-metadata">

**Author:** ![sgmeyer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgmeyer/32/3387_2.png) [@sgmeyer](https://community.auth0.com/u/sgmeyer)\
**Post date:** [June 12, 2018, 3:19am UTC](https://community.auth0.com/t/sso-for-highly-trusted-desktop-applications/12069/4 "2018-06-12T03:19:02Z")

</div>

To my knowledge there is not explicit way to find this out. Besides of course having the user do a redirect to /authorize with prompt=none. This is how CheckSession and the new getSsoData works in Auth0.js. However if you are looking to query for active open sessions I am not aware of anyway to get this info.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 25, 2019, 2:04pm UTC](https://community.auth0.com/t/sso-for-highly-trusted-desktop-applications/12069/5 "2019-07-25T14:04:43Z")

</div>


