Invitations should be compatible with SSO

So I’ll share with you guys what I am doing.

I have OKTA setup as my SSO provider for authentication. OKTA connects to my company’s active directory environment and so I decided to use PowerShell to make scheduled tasks pre-staging users, placing them into groups, and also making them watchers of categories based on what group they are in.

I’ll share with you some of the PowerShell Snippets I have

Here are some Utility functions

Here is what I use for pre-staging users, the utility script gets called to this.

If the user already exists, Discourse won’t create another one. I might utilize my pgSQL connection to check if the user exists before calling the user creation.

And here is my group sync with AD groups

Probably not the most efficient script but it works well.

Finally, I have a Discourse plugin that runs every 24 hours to make sure users remain watching a category even if they change it back to normal.

3 лайка