# Creat a user automatically when granted a Discord Role?

**URL:** https://meta.discourse.org/t/creat-a-user-automatically-when-granted-a-discord-role/219918
**Category:** SSO
**Created:** [March 3, 2022, 4:09am UTC](https://meta.discourse.org/t/creat-a-user-automatically-when-granted-a-discord-role/219918 "2022-03-03T04:09:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![DyNite](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dynite/32/251678_2.png) [@DyNite](https://meta.discourse.org/u/DyNite)
#### Post date: [March 3, 2022, 4:09am UTC](https://meta.discourse.org/t/creat-a-user-automatically-when-granted-a-discord-role/219918/1 "2022-03-03T04:09:59Z")

</div>

Most of our traffic is through Discord, but select members needed to write proposals use Discourse.

Has someone had something similar or requested something like so?

1. User signs up and connects their discord account to discourse  
(either by signing up that way or connecting after)
2. The user would be potentially added to groups on discourse automatically based on Discord role.  
I would want these specific groups to then sync the user to be added to a group on discord.

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [March 3, 2022, 4:46pm UTC](https://meta.discourse.org/t/creat-a-user-automatically-when-granted-a-discord-role/219918/2 "2022-03-03T16:46:41Z")

</div>

Have you been able to search through the forum for past work on this? There have been quite a lot of discussions and officially sponsored work. This topic: [Discourse Trust Levels for Discord](https://meta.discourse.org/t/discourse-trust-levels-for-discord/108232/) has some of these discussions and links to the different topics on what you are looking to do. Searching for [Search results for 'sign up with discord' - Discourse Meta](https://meta.discourse.org/search?context=topic&context_id=219918&q=sign%20up%20with%20discord&skip_context=true) or some other phrase would show more topics.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 3, 2022, 5:14pm UTC](https://meta.discourse.org/t/creat-a-user-automatically-when-granted-a-discord-role/219918/3 "2022-03-03T17:14:40Z")

</div>

For User creation, use the out of the box behaviour of the Discord login.

For group membership you are looking at something more complex.

@spirobel has a plugin that syncs Discord roles → Discourse groups, but he charges for it (good for him), so maybe discuss with him privately?

If you want to contribute to the main open source Discord/Discourse bot project, look at:

> [@Discord Bot Construction Kit robot](https://meta.discourse.org/t/discord-bot-construction-kit/122530):
>
> Purpose of this plugin This plugin does several things: Allows you to power a Discord bot using your Discourse server to do stuff to link the two systems. Fork this repo and expand it with simple Ruby to create all kinds of bot functionality. Existing functionality to serve as examples and useful utility: Provides some two-way auto posting of content that meet some criteria. Command to copy messages ad hoc to Discourse Command to sync group membership to role membership of your Discor…

(but bear in mind it currently does not have fully automated sync (it is command initiated) and it in any case syncs the other way, but would give you a foundation in any case.).

There is also this plugin, but it doesn’t seem to be actively supported, and again goes the wrong direction. It is based on my code: [Discord Sync: sync a Discourse forum with a Discord server](https://meta.discourse.org/t/discord-sync-sync-a-discourse-forum-with-a-discord-server/175864). There is also a useful discussion about the topic further down.
