# Is it possible to pass badges as the SSO payload?

**URL:** https://meta.discourse.org/t/is-it-possible-to-pass-badges-as-the-sso-payload/281537
**Category:** SSO
**Tags:** badges
**Created:** [June 3, 2019, 3:41pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-badges-as-the-sso-payload/281537 "2019-06-03T15:41:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![njj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/njj/32/142904_2.png) [@njj](https://meta.discourse.org/u/njj)
#### Post date: [June 3, 2019, 3:41pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-badges-as-the-sso-payload/281537/1 "2019-06-03T15:41:32Z")

</div>

I’m using a custom SSO solution, is it possible to pass badges as the SSO payload? I couldn’t find anything in the sso guide for it.

We have a specific type of accolade we give our users on our platform, and we want that to reflect on our Discourse forum as well. It’s basically a boolean value, and I can pass it to the payload on login if that is allowed. Otherwise is it possible to make a group and if you’re part of that special group that you have a badge?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 3, 2019, 5:00pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-badges-as-the-sso-payload/281537/2 "2019-06-03T17:00:53Z")

</div>

> [@njj](#):
>
> is it possible to pass badges as the SSO payload?

No, this isn’t possible. You can grant a custom badge through the API though. See [Grant a custom badge through the API](https://meta.discourse.org/t/how-to-grant-a-custom-badge-through-the-api/103270) for details about that.

> [@njj](#):
>
> is it possible to make a group and if you’re part of that special group that you have a badge?

You can [create a group that adds a group flair to its members’ avatars](https://meta.discourse.org/t/create-a-group-that-automatically-adds-associated-flair-to-its-members-avatars/82700). This is how the Discourse Team flair is displayed on this forum. To automatically grant a _badge_, instead of an avatar flair, to members of a specific group, you could either write a badge query, or you could grant the badge through the API.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 3, 2019, 5:09pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-badges-as-the-sso-payload/281537/3 "2019-06-03T17:09:23Z")

</div>

In case Simon’s idea isn’t clear, you can pass the external badge as a group and then use a custom badge query in discourse to assign a badge to members of that group. (group flair is lots easier if that’ll work for you)
