# Create SSO Users, Adding To Group, Subscribing to Category via API

**URL:** <https://meta.discourse.org/t/create-sso-users-adding-to-group-subscribing-to-category-via-api/67335>\
**Category:** SSO\
**Created:** [August 2, 2017, 6:10pm UTC](https://meta.discourse.org/t/create-sso-users-adding-to-group-subscribing-to-category-via-api/67335 "2017-08-02T18:10:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Webmaster\_ESN\_Greece](https://avatars.discourse-cdn.com/v4/letter/w/91b2a8/32.png) [@Webmaster\_ESN\_Greece](https://meta.discourse.org/u/Webmaster_ESN_Greece)\
**Post date:** [August 3, 2017, 2:19pm UTC](https://meta.discourse.org/t/create-sso-users-adding-to-group-subscribing-to-category-via-api/67335/4 "2017-08-03T14:19:57Z")

</div>

Hello, in ESN Greece (there is a cas server), so after the authentication, the user info is available in our PHP app, which next it will redirect back to discourse. ([SSOhelper](https://github.com/cviebrock/discourse-php))

fields you may send back to discourse are

> ```
> 'username' => string,
> 'name' => string,
> 'avatar_url' => string->url,
> 'add_groups' => discourse group names seperated with comma,
> 'remove_groups' => discourse group names seperated with comma
> 
> ```

About some categories based on Group you may edit your Groups @ discourse level and set them what categories to watch by default

---

_[View the full topic](https://meta.discourse.org/t/create-sso-users-adding-to-group-subscribing-to-category-via-api/67335)._
