Provisior Tech Blog

Self-service by default

Single post

Current members: Slack

As I wrote about providing full insight in user access rights for cloud applications as well in one of my previous blogs, today I will start with a first example of this. We use Slack internally for quick communication between team members. Personally, I love Slack. You can quickly send messages and share media in an easy to use tool. And it provides API’s so you can do some automation as well, which of course is where the real fun begins, right?

To be able to show which users have access to Slack, all we need is a list that Provisior can link to employees. One of the API’s available lets us retrieve the list of Slack users within a certain workspace. We use the email address of users to link them in Provisior, which is one of the options you have (next to SAMAccountname, SID and Provisior’s internal EmployeeID).

$users = Get-SlackUser -Token $SlackToken | where Deleted -EQ $false | select -ExpandProperty Email

So with just one single line of PowerShell we can retrieve this and Provisior does the rest. As soon as a new Slack member is added or removed/deactivated, this will automatically be reflected in the user’s current assets in Provisior.

Note that I use the PowerShell module for Slack in this example. Of course you can call the Slack API’s with PowerShell directly as well.

Write a Comment

Your email address will not be published. Required fields are marked *