Category Archives: Office 365

Cloud Automation and PowerShell at UK User Groups

After a busy week at the PowerShell Conference Europe last week, blog post about this event is coming up soon! This week will be all about cloud based automation in both the form of Azure Functions as well as Microsoft Flow.

I will be speaking about this at the UK Cloud Infrastructure User GroupPowerShell Southampton, WinOpsPowerShell London UK and a collaboration between the Scottish PowerShell & DevOps User Group and the Glasgow SQL User Group.

Are you in the UK and are you interested in Cloud Automation using Microsoft Flow or Azure Functions? Then have a look at the following dates and places and sign up while the seats last:

If you cannot make it to any of the events, I will be sharing out the content presented. I look forward to meeting you there!

Share

Microsoft DevDays Beijing

This March the DevDays Beijing were held at the Microsoft Headquarters. This event focused on developers and integration with Azure and its many services. With engineers and team members from the respective product teams on site to deliver presentations and answer questions. For more information about the event head over to the Microsoft DevDays Beijing site.

Microsoft DevDays is coming to Beijing this March! This event is a continuation of Office 365 DevDays in Shanghai and we’re looking forward to bringing our exciting Office products and Microsoft engineers to deep dive into our technologies to teach you how to integrate, extend, and build using our Office 365 platform technologies. Learn and engage in our hands-on workshops to create and build new productivity and solutions.

The sessions have been recorded and are available here:

Share

Automatic Slack invitations with Microsoft Forms and Flow

As we are currently preparing everything for the PowerShell Conference Asia, we decided to open up our Slack team to the general public. In order to do this we had to set up an automated Slack inviter. My initial search for examples of how to set this up resulted in a lot of old blog post, because of that I went back to the drawing board and took a look at what I thought I needed:

  • An online form
  • Trigger when form is filled in
  • A method of inviting

Because I have an Office 365 account I decided to use a combination of Microsoft Forms and Microsoft Flow for this purpose. Microsoft Forms is similar to many other online forms, but the combination with Microsoft Flow was what won me over. Microsoft Flow allows for setting up automated workflows in Office 365. It can also use webhooks, which happens to be an excellent method of working with Slack.

I then found this post on Stack Overflow, in the Slack API team invitation question, covering an undocumented feature in the Slack API that allows for invitations to be send out by webhooks. With that we filled in the have matched the requirements for setting up automatic invites for Slack.

So first things first, in order to use the Slack API we require a token, for this purpose I requested a Legacy token, which can be done at the following URI:

https://api.slack.com/custom-integrations/legacy-tokens

After clicking create token you will get a string that resembles this:

xoxp-00000000000-00000000000-000000000000-00000aa0a00a0a0a0aa0aaf00b00a00d

We will need this to authenticate with Slack once we setup the webhook, because of this it is important you do not share this token with anyone, or store this in a public repository.

The next step is to setup a form in Microsoft Forms, to keep sign up simple we will just request users to enter their email address. They can choose to fill in the rest of their details when they click the registration link that will be send out by Slack. I created the following:

Next up we want to create a sharing link for this Form, make sure you set the sharing option to, Anyone with the link can respond, as the default sharing option is that only people within your Office 365 organization are able to access the Form. This can be done as shown in the following screenshot.

Now that we have this setup it is time to create our Flow. For the purpose of this blog post I created a simple Flow that triggers when a response has been received:

Then we configure the HTTP webhook to trigger Slack to send an invitation email to that email address:

https://slack.com/api/users.admin.invite?token=xoxp-00000000000-00000000000-000000000000-00000aa0a00a0a0a0aa0aaf00b00a00d&email=

After saving and enabling this flow the automatic invitations will be send out as soon as someone fills out the form. Because we made the the sharing link public to the Microsoft Form you can now use social media to share out and promote your Slack team.

Let me know how this works for you and if you have become curious about the PowerShell Conference Asia or you want to network with some of the attendees and speakers of that conference you can sign up here:

PowerShell Conference Asia – Slack Invitation

Share