Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Using Azure Runbooks and Microsoft Flow to Automate SharePoint Tasks

89 views

Published on

Presented at the North American Collaboration Summit 2019

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Using Azure Runbooks and Microsoft Flow to Automate SharePoint Tasks

  1. 1. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 1 Using Azure Runbooks and Microsoft Flow to Automate SharePoint Tasks Geoff Varosky @ North American Collaboration Summit 2019 March 14, 2019
  2. 2. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 2 • Insight • Senior Architect in Managed Services • SharePoint, Office 365, Azure • (was) President and Co-Founder of BASPUG • Co-Founder of Office 365 Users Group (now co-organizer) • Co-Organizer for SharePoint Saturday New England • Blog: http://www.SharePointYankee.com • Email: geoff.varosky@insight.com • Twitter: @gvaro About Me
  3. 3. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 3 About Me
  4. 4. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 4 About Me
  5. 5. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 5 About Me musicalnature.net
  6. 6. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 6 • What are Azure Runbooks? • Setting up Azure Automation • Basic Flow and Runbook • Slightly More Complex Flow and Runbook • Conclusion • References / Q&A Agenda
  7. 7. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 7 Azure Runbooks
  8. 8. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 8 What are Azure Runbooks?
  9. 9. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 9 Runbook Types Type Description Graphical Based on Windows PowerShell and created and edited completely in graphical editor in Azure portal. Graphical PowerShell Workflow Based on Windows PowerShell Workflow and created and edited completely in the graphical editor in Azure portal. PowerShell Text runbook based on Windows PowerShell script. PowerShell Workflow Text runbook based on Windows PowerShell Workflow script. Python Text runbook based on Python.
  10. 10. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 10 Demo Creating an Azure Automation Account and Runbook
  11. 11. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 11 Our Basic Flow
  12. 12. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 12 What’s a Webhook?
  13. 13. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 13 What’s a Webhook? • Define Name, Expiration Date, and Enabled status • Contains security token • Should be treated like a password • Cannot get URL again once you’ve created it https://s1events.azure-automation.net/webhooks?token=ouNI73P4PIh%2fBm5%2bAv%2bnWIXWQKJcEef%2bn4D2OQoelWM%3d
  14. 14. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 14 Demo Creating a Flow to Call our Runbook
  15. 15. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 15 Our Slightly More Complex Flow
  16. 16. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 16 Our Slightly More Complex Flow • Add a PowerShell Module into our Automation Account • Store credentials in SharePoint to Login to O365 • Call a flow from SharePoint • Send data using WEBHOOKDATA to Azure Runbook • Create a sub site based on that data • Hope it all works!
  17. 17. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 17 $WEBHOOKDATA
  18. 18. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 18 $WEBHOOKDATA {"WebhookName":"Create-ClientProjectSites","RequestBody":"","RequestHeader":{"Connection":"Keep-Alive","Accept- Encoding":"gzip","Accept-Language":"en-US","Host":"s1events.azure-automation.net","User-Agent":"azure-logic- apps/1.0","ClientName":“Some Client","ClientLogo":" Some_Client.jpg","ClientDesc":"dfsf","ClientURL":"https://something.sharepoint.com/sites/Somesite/SomeClient/default.aspx"," ProjectName":"Master Services Agreement","ProjectURLName":"MasterServices","ProjectDesc":"Completing an MSA","ProjectStatus":"Pursuit","CreateSiteID":"45","x-ms-execution-location":"westus","x-ms-workflow- id":"da8706a5f51940819c879ce922fbcb46","x-ms-workflow-version":"085866698440834939","x-ms-workflow- name":"b3a7119a-cc38-4725-becf-7d4fd69103","x-ms-workflow-system-id":"/locations/westus/scaleunits/prod- 15/workflows/da8706a5f9c879ce922fbcb46","x-ms-workflow-run-id":"08586662253096872939738593106CU07","x-ms- workflow-run-tracking-id":"e16b81ba-48c0-430b-a65e-280ab2ca71","x-ms-workflow-operation-name":"HTTP","x-ms-workflow- subscription-id":"fa00899a-0d59-4cf6-8549-078f03a6ee","x-ms-workflow-resourcegroup- name":"6C637512C4174E789D6B61258E4B619-F0089114D4833B19B023FCD489","x-ms-tracking-id":"0cd110-a428-44dd- 8a54-54df852742fa","x-ms-correlation-id":"8c0cd110-a428-44dd-8a54-54df852742fa","x-ms-client-request-id":"8c0cd110-a428- 44dd-8a54-54df852742fa","x-ms-client-tracking-id":"0858663096872940738593106CU42","x-ms-action-tracking-id":"7b1d12be- 4a44-4a99-b66873652e1","x-ms-activity-vector":"IN.IZ.IN.05.IN.0X"}}
  19. 19. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 19 Demo Doing Something Useful…
  20. 20. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 20 Conclusion
  21. 21. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 21 Conclusion • How we use it @Insight • Add approval workflow around the list
  22. 22. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 22 References
  23. 23. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 23 • Creating Runbooks in Azure and Calling Them from SharePoint Using Webhooks and Flow • https://go-to.blog/runandflow • Azure Automation Credentials • https://go-to.blog/aacreds • Importing PowerShell Modules into Azure Automation • https://go-to.blog/importpws • Introduction to Azure Automation • https://docs.microsoft.com/en-us/azure/automation/automation-intro • Azure Automation Runbook Types • https://docs.microsoft.com/en-us/azure/automation/automation-runbook-types • Learning key Windows PowerShell Workflow concepts for Automation runbooks • https://docs.microsoft.com/en-us/azure/automation/automation-powershell-workflow • Azure Run-As Accounts • https://docs.microsoft.com/en-us/azure/automation/manage-runas-account References
  24. 24. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 24 Thank you!
  25. 25. BlueMetal Presentation Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2017 Insight Direct USA, Inc. All Rights Reserved. 25 • Insight • Senior Architect in Managed Services • SharePoint, Office 365, Azure • (was) President and Co-Founder of BASPUG • Co-Founder of Office 365 Users Group (now co-organizer) • Co-Organizer for SharePoint Saturday New England • Blog: http://www.SharePointYankee.com • Email: geoff.varosky@insight.com • Twitter: @gvaro About Me

×