Automate Custom Solutions Deployment on Office 365 and Azure

Slides:



Advertisements
Similar presentations
Implementing enterprise governance can sometimes feel like trying to corral an exuberant crowd.
Advertisements

St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
27. to 28. March 2007 | Geneva, Switzerland. Fabrice Romelard ilem SA Level 200.
Microsoft SharePoint 2013 SharePoint 2013 as a Developer Platform
Fraser Technical Solutions, LLC
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Partner Practice Enablement - Overview This session will focus on integration strategies for applications deployed using Microsoft Azure Websites and Microsoft.
TechEd /22/2017 5:40 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Partner Practice Enablement - Overview This session will focus on integration strategies for applications deployed using Microsoft Azure Websites and Microsoft.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
What’s New in SharePoint 2010 SharePoint 2010 Development Primer New Developer Tools for SharePoint 2010 SharePoint 2010 Integration with PowerShell.
Michael Hofer Senior Consultant Microsoft Corporation.
Welcome to Azure App Services! Amie Seisay
Welcome to Azure App Services! Amie Seisay
Windows 8 Application Microsoft Word with an app for Office Internal O365 SharePoint Site Windows Azure Web Sites Windows Azure Workflow Service.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
NET Development on Microsoft SharePoint Technology Part 4: Templates, Features, and Solution Deployment Mick Badran Breeze Training Consulting Trainer.
Using Azure Active Directory Authentication with your SharePoint Add-Ins for Office 365.
Welcome To Going from SharePoint On Premise to SharePoint Online Speaker: Matthew W. Tallman #SharePointCincy.
Leveraging Web Content Management in SharePoint 2013 Christina Wheeler.
Office 365: Attack of the Clones! Building reusable site templates with the Office 365 PnP Framework.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Inspirirani ljudima. Ugasite mobitele. Hvala.. Paolo Pialorsi Senior Consultant PiaSys ( Publishing apps for SharePoint 2013 on Microsoft.
Martina Grom MVP Office 365 How to (remote) control Office 365 with Azure Toni Pohl MVP Client Dev
A Developer’s Introduction to SharePoint 2013 Apps Ryan McIntyre, MCITP, MCPD National
Microsoft Dynamics NAV Microsoft Dynamics NAV managed service for partners, under the hood Dmitry Chadayev Corporate Vice President, Microsoft.
Developers Introduction to the Power BI Platform.
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
From SharePoint to Office 365 Development
1/27/2018 5:13 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Stress Free Deployments with Octopus Deploy
What's new in the world of SharePoint development and deployment
SharePoint Provisioning Success with PnP PowerShell
Effective Client-side Coding against Office 365
DotNetNuke® Web Application Framework
Migrating SharePoint Add-ins from Azure ACS to Azure AD
Line of Business Solutions in SharePoint Online
Who Needs a Developer for Automated SharePoint Provisioning?
What is SharePoint and why you should care
Upgrading from Full Trust Code to Add-in Model and SharePoint Framework Paolo Pialorsi Senior Consultant - PiaSys.com Track: DEV | Level:
Power BI Security Best Practices
SharePoint Framework Extensions
SharePoint Online Development Best Practices
Application Lifecycle Management – Best Practices for SharePoint and Office App development November 2015.
Introduction to SharePoint Framework (SPFx)
Understanding SharePoint Framework and Modern Development
Transforming SharePoint Farm Solutions to the Add-in Model
SharePoint 2019 Changes Point of View.
Hybrid Search Planning Implementation.
Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework
SharePoint Online Hybrid – Configure Outbound Search
Windows Azure Keenan Newton 3-021
SharePoint Security for the Site Owner
SharePoint Permissions Manager
LitwareHR v2: an S+S reference application
SharePoint Online Authentication Patterns
Site scripts and Site Design
SharePoint 2019 Overview and Use SPFx Extensions
Workflow Development using Visual Studio 2017 for SharePoint online
Office 365 Development.
SharePoint Server 2019.
Explore PnP Partner Pack for IT pros, admins and architects
04 | Apps and SharePoint Chris Johnson | SharePoint Guru
PowerShell + SharePoint Online – An Admins Guide to Administration in the O365 Cloud Marrell Sanders – Sr. SharePoint Administrator NACS Branson, MO.
PowerShell + SharePoint Online – An Admins Guide to Administration in the O365 Cloud Marrell Sanders – Sr. SharePoint Administrator SharePoint Saturday.
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
PnP Partner Pack - Introduction
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Power BI Embedded for Fun and Profit
Presentation transcript:

Automate Custom Solutions Deployment on Office 365 and Azure Paolo Pialorsi 14 octobre 2017 #SPSParis

Merci pour votre soutien

About me Project Manager, Consultant, Trainer About 50 Microsoft certification exams passed MCSM – Charter SharePoint MVP Office Servers and Services SharePoint PnP Core Team Member Focused on SharePoint and Office 365 since the beginning Author of many books about XML, SOAP, .NET, LINQ, SharePoint, and Office 365 Speaker at main IT conferences

Agenda Set the context of automated deployment Authentication and Authorization Microsoft Graph Microsoft Azure Management API SharePoint PnP Provisioning

DEMO Let’s set the context: PnP Partner Pack Setup Wizard https://youtu.be/D98jqzPkfj0

Goals of the sample project Create SPO Site Collections Generate on the fly an X.509 certificate Configure Azure AD Application Configure X.509 certificate for App-Only with SPO Configure custom settings for the Application Configure custom permissions to consume Microsoft Graph and SPO Create an Azure Resource Group Create an Azure Blob Storage account Create an Azure App Service Configure custom settings for the App Service Build, package, and publish an ASP.NET Web Application Build, package, and publish a bunch of Web Jobs

Security Authentication and Authorization

Requirements Demo application requires to be executed as local admin To create the X.509 certificate You need Tenant Global Admin account for the Office 365 Valid Azure Subscription backing the Office 365 tenant You need Admin account for target Azure Subscription

AuthN & AuthZ Two applications registered in the target tenant One Azure AD multi-tenant native application The main application, which manages the Azure AD resources One Office 365 application The one that corresponds to the PnP Partner Pack in our scenario ADAL 3.x for AuthN & AuthZ logic

Security Infrastructure and Applications Configuration DEMO Security Infrastructure and Applications Configuration

Working with SPO

Site Collection creation We use PnP Core Library and Tenant class From Microsoft.Online.SharePoint.TenantAdministration Based on PnP extension methods SiteExists DeleteSiteCollectionFromRecycleBin CreateSiteCollection We use PnP Provisioning Engine to provision artifacts

PnP Provisioning Engine One of the most useful capabilities provided by PnP Available in different flavors .NET with PnP Core Library PowerShell with PnP cmdlets Typical use cases PowerShell automation Azure Web Jobs Azure Functions Back-end services Etc.

PnP Provisioning Engine: main capabilities XML or Open XML (.PNP) based storage Can eventually be used “just in memory” You can extract a template from a live (model) site You can apply a template to multiple sites Delta handling of templates We add or update, we do not delete/remove Supports both SPO and SP2013/2016

Main Features SP2013, SP2016 and SPO Delta templates XML, JSON formatter Site Columns Content Types Lists/Libraries Instances Features (Site or Web) Custom Actions (Site or Web) Files/Pages (Wiki, WebPart) Taxonomies Composed Look Site Policies Web Settings Regional Settings UI Languages Resource Files Audit Settings Workflows (SPD only) Search Settings Publishing (including Page Layouts) Navigation Settings Modern Pages Client-side Web Parts Client-side Extensions

SPO Site Collection creation and Artifacts provisioning DEMO SPO Site Collection creation and Artifacts provisioning

Working with Azure AD

Azure AD Application Registration We register the application with a custom manifest file Including custom permissions for other APIs We create on the fly the shared secret We configure all the URLs POST against Graph beta endpoint https://graph.microsoft.com/beta/applications Response will be the just created application

Azure AD Application registration DEMO Azure AD Application registration

Working with Azure

Azure Management API Allows managing resources on Azure REST based API https://management.azure.com/ Using Azure AD and OAuth 2.0 for authorization There are endpoints for almost everything  … You need a target subscription And you can browse for them through API You need to register to manage specific resources Can be done still using the API … There are different versions, depending on the target endpoint

Creating a Resource Group Make a PUT request against subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName} ?api-version=2016-09-01 You’ll get back a JSON object Describes the Resource Group You need a service plan, too subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provi ders/Microsoft.Web/serverfarms/{servicePlanName} ?api-version=2015-08-01

Creating a Blob Storage Account Make a PUT request against subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provi ders/Microsoft.Storage/storageAccounts/{storageAccountName.ToLower()} ?api-version=2016-12-01 When you create a Storage Account Wait for the account to be ready Make GET request and wait for «Succeded» status Once it’s ready, get the storage keys Make a POST request for subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Micros oft.Storage/storageAccounts/{storageAccountName.ToLower()}/listKeys As usual, you’ll get back the keys in a JSON object

Creating the Blob Storage Account DEMO Creating the Blob Storage Account

Creating an Azure App Service (1/2) Make a PUT request against subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provi ders/Microsoft.Web/sites/{appServiceName} ?api-version=2016-08-01 Application Settings are an untyped array of JSON objects { “Name”: “SettingName”, “Value”: “Value” } To upload X.509 certificate, make a PUT request against subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provi ders/Microsoft.Web/certificates/{appServiceName}-pfx ?api-version=2016-03-01 Provide certificate PFX blob + password

Creating an Azure App Service (2/2) Get a Publishing Profile settings file subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provi ders/Microsoft.Web/sites/{appServiceName}/publishxml ?api-version=2016-08-01 You’ll get back the XML publishing settings file You can parse it for settings

Creating the Azure App Service DEMO Creating the Azure App Service

Build, Package, and Deploy Web Site We used PowerShell from .NET + MSBuild Hidden background running console The Visual Studio version makes the difference Because MSBuild path changes Then we run MSBUILD /p:Configuration=Release /p:OutputPath="$tempPath" /p:VisualStudioVersion="$vsVersion" /p:PublishSettingsFile="$PublishingSettingsPath" /p:DeployOnBuild=true

Build, Package, and Deploy Web Jobs We used PowerShell from .NET + MSBuild Hidden background running console The Visual Studio version makes the difference (as like as before) Because MSBuild path changes Then we create a ZIP file with the build output And we upload the ZIP toward SCM of the App Service https://{appServiceName}.scm.azurewebsites.net/api/zip/site/wwwroot/App _Data/jobs/{jobType.ToString().ToLower()}/{jobName}/ Basic Authentication with publishing profile settings credentials

Build, Package, and Deploy on Azure DEMO Build, Package, and Deploy on Azure

Useful Links https://github.com/SharePoint/PnP-Partner-Pack https://www.youtube.com/watch?v=D98jqzPkfj0 https://docs.microsoft.com/en-us/rest/api/apimanagement/ https://msdn.microsoft.com/en-us/pnp_articles/pnp-provisioning- engine-and-the-core-library https://msdn.microsoft.com/en-us/pnp_articles/introducing-the- pnp-provisioning-engine

Q&A

Thank you!

Thank you, for your for #SPSParis