# /admin/users/sync\_sso ... Percorso non trovato

**URL:** <https://meta.discourse.org/t/admin-users-sync-sso-route-not-found/85819>\
**Category:** SSO\
**Created:** [20 Aprile 2018, 5:26pm UTC](https://meta.discourse.org/t/admin-users-sync-sso-route-not-found/85819 "2018-04-20T17:26:35Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Nopsled](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nopsled/32/120092_2.png) [@Nopsled](https://meta.discourse.org/u/Nopsled)\
**Post date:** [20 Aprile 2018, 10:35pm UTC](https://meta.discourse.org/t/admin-users-sync-sso-route-not-found/85819/9 "2018-04-20T22:35:42Z")

</div>

**Code that produces the bottom query:**

```
const userparams = {
      external_id: user._id.toString(),
      email: user.email,
      username: user.username.replace(/\s/g, ''),
    };
    const payload = new Buffer(querystring.stringify(userparams), 'utf8').toString('base64');
    const hmac = crypto.createHmac('sha256', DiscourseSSOKey);
    hmac.update(payload);
    const query = querystring.stringify({
      sso: payload,
      sig: hmac.digest('hex'),
      api_username: UserName,
      api_key: API Key,
    });
    console.log(query);
    fetch('https://community.somesite.com/admin/users/sync_sso', {
      method: 'POST',
      body: query,
    })
      .then(res => res.json())
      .then(json => console.log(json));    

```

**Here’s the query that gets generated and passed as the body on the POST route:**

sso=somelongSSOgenerated.&sig=somelongsignature&api\_username=someusername&api\_key=someAPIKey

This all still gives me a Route Not Found error in the rails logs.

---

_[View the full topic](https://meta.discourse.org/t/admin-users-sync-sso-route-not-found/85819)._
