Wednesday, 17 February 2016

Get started Office 365/SharePoint Online dev with an Azure VM – part 1: Create trial environments and a VM

I’m always surprised by the number of roadblocks which developers in large organisations have to face. Whether it’s locked-down desktops, lack of virtual machines (or very low spec virtual machines), inadequate licensing for developer tools, or any of the other myriad of issues, it can be frustrating trying to get started with new technologies. I often talk to developers in such companies, and often see some reluctance to do things which I find myself doing fairly frequently to test things out – creating a trial Office 365 environment, spinning up a virtual machine in Azure, downloading/testing an Office 365 or SharePoint app and so on. Recently I put together a guide to steps like these (for attendees of a Microsoft dev event here in the UK), and I thought it might be nice to repurpose the guide for other newbie developers in case it’s useful. This is split into two articles:

  1. Get started – part 1: Create trial environments and a VM (this post)
  2. Get started – part 2: Get started with developing SharePoint Add-ins (apps)

I guess the type of SharePoint developer this is aimed at is:

  • Doesn’t have access to an Office 365 environment to play in – may not even have touched SharePoint Online before
  • Isn’t able to quickly obtain a new virtual machine
  • Doesn’t have an MSDN license
  • May not have touched Azure before
  • Needs a developer environment with the latest version of Visual Studio to look at/run code locally (i.e. hosting apps on https://localhost). Perhaps their existing desktop or virtual machines aren’t appropriate for this

If one or more apply to you, you might find this useful. We’ll go from creating the Office 365 and Azure dev environments, to downloading and running a sample app (a provider-hosted SharePoint Add-in) from Microsoft’s OfficeDev Patterns and Practices samples. This can help someone experience add/add-in development for the first time, but it can be just a generally useful set of steps that can be handy in several scenarios.

Disclaimer!

Although I've taken care with these steps, I make no guarantee they're 100% accurate/will work in all regions/at all times, and can't really dedicate much time to support around this topic I'm afraid! Hopefully they're enough to get you up and running though.

Here’s what is covered:

This post:
  • Create trial Office 365 E3 tenant
  • Create a trial Azure subscription
    • NOTE – you WILL need a credit card for this step unfortunately. BUT, it’s possible to avoid spending money, since you receive credit to the value of £125 and by default, the Azure subscription is “locked” to prevent further charges. This will enable you to get started at least
  • Prepare the SharePoint Online tenancy for apps – create an App Catalog etc.
  • Create a development VM in Azure with Visual Studio 2015
  • Prepare Azure VM for development (e.g. enable IIS and ASP.NET, install the OfficeDev tools for Visual Studio etc.)
Next post:
  • Walkthrough of deploying a provider-hosted SharePoint add-in in your VM (next post)
  • Create a self-signed SSL certificate
  • Create a local website in IIS to run apps
  • Download the SharePoint Add-in from Github and run locally
Create a trial Office 365 environment (E3)

In this step, we’ll create a trial Office 365 environment to enable us to do some development. Note that another option here is to sign-up to the Office 365 Developer program – this will provide you with a tenant which will last 365 days, but only contains one user. If I’m just spinning up something which I don’t care about being durable, I often prefer to create an E3 trial – this only lasts for 30 days, but comes with 25 users. Both options are useful (depending on what you’re doing), but in this case we’ll go through the process for creating an E3 trial.

To do this, navigate to the Office 365 Enterprise E3 product page (the UK version of this page is at the following link, but simply change the market using the selector at the bottom of the page if you are in another country - https://products.office.com/en-GB/business/office-365-enterprise-e3-business-software?omkt=en-GB). Click the “Free trial” link on this page:

clip_image002_thumb2[10]

Enter some details into the form and click “Next”:

clip_image004_thumb2[4]

On the next screen, provide a username and also select a prefix for the “.onmicrosoft.com” domain – NOTE, this must be unique in Office 365, so you may need to try a few names until you find one which is unique:

clip_image006_thumb2[4]

Click “Next” when done. On the next screen, provide your mobile phone number to receive the text message verification. Once entered, click “Text me”:

clip_image008_thumb2[4]

Enter the code in the box provided, then click “Create my account”:

clip_image010_thumb2[4]

On the next screen, make a note of the user ID you provided and then click the “You’re ready to go…” link:

clip_image012_thumb2[4]

Your Office 365 environment is now creating – this will take around 20 minutes:

clip_image014_thumb2[4]

Prepare Office 365 tenant for development

Once your tenant has finished provisioning, go to the Admin Center and navigate to the SharePoint area. If your tenant is using the current Admin Center experience (rather than the new preview experience), the link is here:

clip_image016_thumb2[4]

Once in the SharePoint area, navigate to the “settings” page:

clip_image017_thumb2[4]

On this page, scroll to the “Custom Script” section. Change both radio buttons to the “allow” option to enable custom scripts to execute. The radio buttons should look like this:

clip_image019_thumb2[4]

Click “OK” to save the settings.

Now go into the “apps” area, and select “App Catalog”:

clip_image020_thumb2[4]

Ensure the option to create a new App Catalog site is selected, then click “OK”:

clip_image022_thumb2[4]

Complete the form using settings similar to the below – ensure you enter YOUR username for the administrator field:

clip_image024_thumb2[4]

Click “OK” when done. The App Catalog site will now create.

Provide payment details to enable the “full” Azure subscription

Within the Office 365 admin area, click the “Azure AD” link:

clip_image025_thumb2[4]

On the next page, click the “Azure subscription” link to start the process of signing-up to Azure:

clip_image027_thumb2[4]

Complete the details on the sign-up page which appears next. You’ll need to verify your identity by providing a phone number to receive a text message or call, and it’s here that you’ll need to provide credit card details. As a reminder, you WON’T be charged for anything unless you explicitly change to a paid subscription – as the page tells you:

clip_image029_thumb2[4]

Once you’re through the process, click “Sign-up”:

clip_image031_thumb2[4]

Your Azure subscription is now creating. You’ll see a screen like the following (though some of the messages may be different) - wait for this process to complete:

clip_image033_thumb2[4]

When the process completes, click the “Start managing my service” button as shown below:

clip_image035_thumb2[4]

Your Azure subscription should now be ready, and you should then be taken into the Azure Portal:

clip_image037_thumb2[4]

Create a development VM in Azure

In this step, we will create a new virtual machine in Azure using the Visual Studio Community 2015 template. Go into the “Virtual machines (classic)” area of the portal, and click the “Add” button:

clip_image039_thumb2[4]

In the Virtual Machines area in the Azure portal, filter for ‘Visual Studio Professional 2015’ and then select the resulting VM from the results.

In the filter box, type “visual studio community 2015” and hit enter. In the list of VM templates which appears, locate the item we want:

clip_image041_thumb2[4]

Select this item from the list. On the next screen, select “Resource Manager” in the dropdown box and then click “Create”:

clip_image042_thumb2[4]

On the next page, enter some details for the virtual machine. Be sure to make a note of the username and password you use: Also be careful with the “Resource Group” setting – you’ll need to create a new Resource Group here (any name is OK). Make sure it then becomes selected in the dropdown:

clip_image043_thumb2[4]

On the next page, select size “A2 - Standard” for the virtual machine size:

clip_image044_thumb2[4]

In the next area, leave the default settings and click “OK”:

clip_image045_thumb2[4]

Click “OK” on the confirmation page:

clip_image046_thumb2[4]

The virtual machine will now start to create – this can take around 20 minutes.

Once the VM has been created, select it in the portal and click on ‘Connect’:

clip_image047_thumb2[4]

This will instantiate the RDP connection. Take care in the RDP box – you’ll need to select “use another account” and be sure to enter the username in the following form:

[machine name]\[username]

This is shown below:

clip_image048_thumb2[4]

Click “OK” once the details are entered. After the security prompt, your RDP session should open and you should now have control of the virtual machine. We now need to perform some configuration steps within the VM to be able to develop SharePoint Add-ins and Office 365 apps.

Setting up IIS

One of the first things we need to do is enable apps to be developed/hosted on http://localhost within the VM. The first step is to enable IIS.

Within the VM, right click on the Start button and select ‘Programs and Features’

clip_image049_thumb2[4]

Select “Turn Windows features on or off”:

clip_image051_thumb2[4]

In the “Add Roles and Features Wizard” which appears, click “Next” until you reach the “Server Roles” page of the dialog. Here, check the box for “Web Server (IIS”) and click “OK” to any prompts which appear:

clip_image053_thumb2[4]

Then, click “Next” until you reach the “Role Services” page for IIS. In this dialog, expand “Application Development” and check the boxes for “ASP.NET 3.5” and “ASP.NET 4.5”:

clip_image055_thumb2[4]

Click “OK” to any prompts which appear. On the confirmation screen, check the box for automatic restarts then click “Install”:

clip_image057_thumb[4]

Wait until process has completed. Once complete you now have IIS running on your VM with ASP.Net enabled.

At this point, restart the machine.

Install Office Development tools

Start Visual Studio 2015 – ensure you right-click and run as administrator:

clip_image058_thumb2[4]

In the dialog which appears, click the “Sign in” button:

clip_image059_thumb2[4]

Enter the details you used for your Office 365 subscription and Azure identity:

clip_image060_thumb2[4]

Accept any prompts which appear until Visual Studio is started.

Once VS has started, close it again. Open a browser window, and navigate to http://aka.ms/OfficeDevToolsForVS2015 - save the file at the prompt, and then run from the download location to run the installer:

clip_image062_thumb2[4]

Accept the prompts which appear, and then wait for the install to complete.

Your virtual machine is now broadly ready for SharePoint Add-in and Office 365 development. Some other steps you may perform are:

  • Create a self-signed certificate to run apps on HTTPS
  • Configure a new IIS website to host apps locally (I prefer this to running IIS Express)

We’ll look at these steps in the next post, “Get started with developing SharePoint Add-ins (apps)”. Until then, happy developing!

Tuesday, 8 December 2015

PowerApps – no-code Azure apps which talk to Office 365, SharePoint, SQL and more

PowerApps are a new way for power users to create valuable business apps, which connect to enterprise data and work great on the PC and mobile devices. I agree that it has the potential to be a big game-changer in terms of what the Microsoft stack offers - some other services have similar app building platforms, but Microsoft have a pretty big vision here. The key goal is to facilitate end-users to build applications, but perhaps in contrast to previous approaches, the resulting apps also sit well with I.T. needs – they are integrated with Office 365 and Azure, secure, and capable of being scaled up as needed.

My interpretation of what PowerApps provide can be summarized as:

  • Build apps quickly without code. But in this, you have choices - apps *can* call out to custom code if required (a web API hosted in Azure – and this doesn’t have to be a .NET API, other languages are possible too)
  • Ability to connect to many data sources, including on-premises data. These include SQL Server, SharePoint lists/libraries, OneDrive, Dropbox, Google Docs, SAP, Oracle, Dynamic CRM etc. Interestingly, there’s also an option to use an Excel file as a data source – be it stored in OneDrive, Google Docs or Dropbox
    • These data connections can be stored in a library, so that power users can easily use them without caring about the underlying details
  • A design surface/canvas to build the user interface. Think InfoPath on steroids, but with support for more than just forms. For example, it should be easy to create an interface which presents data in a grid, with full support for CRUD operations (create/read/update/delete) – effectively the screens/pages to support this are auto-generated.
    • The design experience also includes a set of controls – listbox, button, slider, dropdown, image, different types of gallery (e.g. text/image or cards containing both) etc., and even a camera control for use in mobile devices
    • The controls themselves are just HTML and JavaScript – and I’d expect there to be an extensibility model of some sort for creating new controls
    • As well as control properties, there’s an expression box which allows you to type pseudo-code (e.g. to bind a control to data). This is simpler than “real” programming, but is still likely to need a level of technical understanding
  • Apps can be created from a template. “Event signup” and “opportunity template” are a couple of examples which could be good starting points
  • Apps and APIs are hosted in Azure. They are Azure AD apps (so they can be secured, and provide SSO). In terms of where the apps run, there will be the choice of hosting in the Microsoft-managed “PowerApps cloud” (this is a multi-tenant SAAS arrangement, on the “Free” and “Standard” plans) or in your own Azure App Service environment (“Enterprise” plan) – see https://powerapps.microsoft.com/en-us/pricing/ for some more details
    • There will also be some governance and management capabilities, especially on the Enterprise plan
  • Simple distribution to mobile devices. My understanding is there will be a native PowerApps app for all of the major platforms e.g. iOS, Android, Windows phone etc. Users would install this once from the Store, or have it pushed to them for managed devices (e.g. InTune). *Your* individual PowerApps can then be opened inside this app – in other words, any app which is made available to a user will show in some kind of apps list (e.g. expenses app, room booking app etc.)

The experience starts with the build process – I can start by creating an overall app, or creating a logic flow:

Once I’ve started my app, I can create different screens and decide whether each is designed principally for a tablet/phone. I can also choose from a series of templated layouts:

I can then start to add controls to the design surface:

At any point, I can run my app and start to test it – in the image below, it’s an app which is bound to some data and has a screen for displaying all items. Each item has an edit link next to it (the arrow) which takes the user to another screen to edit the item:

In terms of management and access, PowerApps are backed by Azure – specifically, they are registered in Azure AD and hosted in Azure App Service.

What that means is that you get the option of taking advantage of all of the benefits of Azure App Services. They can be scaled as a unit to meet whatever demand you need, the web app parts can be secured with Azure AD to also give single sign-on, and there are specific support capabilities for hosting web APIs there.

Digging deeper

So, hopefully you can start to visualize how a data-driven app can be created, and what it might look like on a mobile device. If you can imagine that being the employee feedback app, the performance review app, the engineer scheduling app, or whatever the simple killer app for you or your client is, even if it’s just powered from data in a SharePoint list or Excel, hopefully you can see the potential for PowerApps.

More information on PowerApps will emerge soon. The service isn’t live at the time of writing, but you can request access to the preview at https://powerapps.microsoft.com/

If you’d like to read more at this stage, I suggest:

More to come!

Thursday, 3 December 2015

Enhancements to SharePoint collaboration, Office 365 groups, user profiles, PowerApps and more on the way! (end 2015)

I spent an interesting week in Redmond with Microsoft recently, listening to details of future plans around Office 365 and SharePoint. Whilst I can’t share much of the info (which is under NDA), Jeff Teper and Bill Baer did announce some details publically at the European SharePoint Conference in Stockholm last week, and one big item, PowerApps, has subsequently been announced publicly. I was in Stockholm to give a couple of talks (for which I’ll publish the slide decks etc. soon), and it was good to see some of the details on other items emerge. Here’s my summary of what’s coming:

  • SharePoint 2016 public beta release - now available
  • Enhancements to user profiles in Office 365 (Delve profiles) – some functionality was demo’d here, and there are some screenshots below
  • Enhancements to SharePoint collaboration and team sites – this is *big* in my opinion
  • Enhancements to OneDrive for Business
  • Enhancements to Office 365 Groups
  • PowerApps – a new model for power users to create business apps, with support for mobile devices
  • Misc enhancements – better external sharing, and improvements to Office 365/SharePoint hybrid

Let’s walk through each of the items in detail.

SharePoint 2016 public beta release

Bill Baer reiterated that SharePoint 2016 is primarily an “infrastructure-focused” release. The headlines are some improvements to help with hybrid set-up and running an on-premises environment, such as the new MinRole server configuration, the Cloud Search Service Application, changes to user profile sync, DLP, and some scale and compliance improvements. In contrast to previous releases however, organizations should not expect significant changes or new things in end-user functionality. Yes, there are some tweaks being brought over from Office 365 – the extensible App Launcher for global navigation (including across on-prem/online sites), and some mobile improvements for example. But nothing huge in terms of new end-user capabilities at this stage. Interestingly, this doesn’t rule out the possibility of more significant functionality changes coming later on – Microsoft are looking at ways to bring the “frequent update” model from Office 365 to on-premises SharePoint for those organizations who want it. This might be an opt-in model for example, but could be used to go beyond just regular patching to deliver entire new experiences and functionality.

Enhancements to user profiles in Office 365 (Delve profiles)

There are some nice additions to people-based functionality in Office 365, primarily around enhancements to the Delve user profile. Some examples of this were shown at the European SharePoint Conference (screenshots below), but I believe at this point there are no guarantees all of these ideas WILL definitely be released. So, although you’re seeing images of this in this post (and maybe others), I personally wouldn’t make any big bets around them yet. But, the direction is clearly around understanding how other colleagues in your organization fit and the work that they do. This is represented in a couple of new tabs on the profile screen, Communications and Analytics – with much of the new stuff under Analytics.

Communications tab

It looks like this will provide details of communications between you and the person whose profile you’re looking at. I could imagine this could be an aggregation of messages across different channels, such as e-mail, conversations in Groups, possibly Yammer etc. Time will tell, but here’s the visualization:

(Click image to see larger version in a new tab)

Delve-profile---comms-tab

Analytics tab

The view of the Analytics tab showed some cool ideas. As shown in the following screenshots, possible future functionality around user analytics includes:

Time in meetings

(Click image to see larger version in a new tab)

Delve profile - analytics 1 

Top connections

(Click image to see larger version in a new tab)

Delve profile - analytics 2 

Network velocity

(Click image to see larger version in a new tab)

Delve profile - analytics 4 

You might be losing touch with

(Click image to see larger version in a new tab)

Delve profile - analytics 5

So, some potentially cool stuff coming to people functionality in Office 365 – clearly some of this data/extrapolation would be working across all services which comprise Office 365, so only Microsoft would be able to build these things easily. But it’s great to see the ambition here, and is a good indicator in my view that the service will continue to get better and better for organizations.

Enhancements to SharePoint collaboration and team sites

This item makes me even happier than the cool stuff shown already. It was mentioned that Microsoft are investing quite in collaboration functionality, with the view that team sites should be a joy to use rather than the plain functional things they are today. Initially this may take the form of relatively small but useful improvements, but in time we can expect team sites to change more radically. Examples of things that may come sooner rather than later include:

  • Improved ways of starting a document in your personal (OneDrive for Business) site, then moving it to a team site for wider collaboration/publishing
  • Improvements to the relationship with Office 365 Groups (also discussed later)

It was also mentioned that whilst these improvements will primarily be in SharePoint Online, but Microsoft are considering ways to also bring these to on-premises SharePoint. They won’t be in the SharePoint 2016 initial release however.

Enhancements to OneDrive for Business

Changes here include the new simplified user interface to the ODFB site, the new sync client which will bring “rock solid” synchronization, improved mobile apps, and better administration control and reporting around use of OneDrive.

The new user interface has been rolled out already – it’s very fast to work with, and surfaces Office 365 Groups and nice tools around seeing key information (previews, sharing and activity info etc.):

clip_image012

If you haven’t heard, Microsoft have now released a new sync client for OneDrive (PC and Mac). Clearly we all hope it will solve the previous sync issues that many have encountered. It will be one “engine” to sync both personal and business OneDrive, and brings some critical improvements such as selective sync, ability to deal with multiple accounts, less pain around limits (file sizes, item limits) and so on. I’ll leave it for the official announcement and other posts to go through the detail, but no doubt this is of interest to most organizations using Office 365.

Other improvements to OneDrive which are coming include:

  • Better reporting management tools around an organization’s use of ODFB – quite a lot in the roadmap here apparently
  • Improvements to mobile apps – Microsoft definitely envision a world where mobile employees are accessed their frequently used docs in their OneDrive using the iOS/Android/Windows apps

Better Office 365 Groups

Jeff described groups as the collaboration glue in Office 365, and it’s clear they will expand in scope from the current capabilities. Personally I have found it hard to “sell” groups as a concept so far, and it was easy to find sub-optimal aspects. BUT, it’s also worth remembering that’s what you get with a Minimum Viable Product! Most folks (me included) had issues with the previous model of Microsoft going away “building” for 3-4 years and then a load of new functionality being dropped, so in the new world of incremental delivery I think it’s important to recognize features which are clearly going to evolve over time, but in their early state don’t necessarily tick all the boxes.

At the time of writing, creating an Office 365 Group gives you a OneDrive library to store files (alongside the other tools such as group mailbox for conversations, calendar, OneNote notebook and so on). Going forward, instead of just a library on the SharePoint side Jeff mentioned that “more and more of a full team site will be unlocked” – and to me this means a better set of tools to support a group. I guess we’ll have to wait and see, but personally I’d like to see this include things like:

  • Ability to create team sites from some kind of custom template
  • Using custom metadata fields/content types with documents, so that findability works well (e.g. refiners on the search page)

PowerApps

PowerApps are a new way of power users creating valuable business apps, which connect to enterprise data and work great on the PC and mobile devices. There’s quite a lot to talk about here and this section started to get pretty long, so I split it out into a separate article – I’ll publish this over the next day or two.

In summary, PowerApps can be used to create apps which talk to data in places like Office 365/SharePoint, SQL Server, and deep developer skills aren’t needed to create the screens/UI in the app. There is support for If This Then That (IFTTT)-style workflow steps - for example, “if an item is added to this Excel file, then send an e-mail and also add an item to this SharePoint list”:

Overall, PowerApps are kind of a blend between event receivers, InfoPath and workflow, but with a whole lot of extra things that mean it’s not a one-to-one match with any of the previous technologies. The ability to easily connect to enterprise data and produce something designed for mobile devices stand out as key extras. Another big difference this time around is that is that the solutions are designed to sit well with I.T. – they run in Azure (a Microsoft service or your own) and can be scaled-up if needed.

Anyway, more on this in my next article.

Misc improvements

If all that wasn’t enough for you, there’s a bag of other things in the pipeline – and depending on your situation, any one of these could be big for you I’d say:

  • Better external sharing in Office 365
    • The ability to share with users from *specific* other organizations (e.g. partners) – administrators can add other Office 365 domains to a whitelist
    • More control over WHO can enable sharing
    • Better reporting on what is shared and with whom
  • Some improvements to Office 365 hybrid
    • Ability to import custom data to SharePoint Online user profiles
      • This will take the form of a new PowerShell command - QueueImportProfileProperties – it reads from a JSON file you have generated (meaning the data can come from anywhere), and requires tenant admin credentials to run
      • [N.B. This is interesting to me, because many of our clients have this need and we’ve previously built very similar tools to solve it]
    • Hybrid Data Loss Prevention
    • SharePoint Insights
      • Better analytics across SharePoint sites (and also for user actions across the wider Office 365 suite if I understand correctly)
      • This applies to both online and on-premises sites – the Insights service runs in the cloud, but can consume data fed from the on-premises side of your hybrid environment
      • The types of reports mentioned include things like “Which features are users using?” and “How is content created and accessed?”
    • Potential metadata/taxonomy improvements – Bill mentioned that Microsoft are “looking at” improving the hybrid story around metadata and content types. Nothing to announce at the moment though.

Summary

So in short, there’s a whole STACK of things coming! Yes, there’ll always be gaps and many folks will have their own views on where Microsoft should be focusing their efforts. For me, there are still items on my SharePoint/Office 365 wish list which don’t seem to be being addressed, but I’m personally very impressed with what I’m seeing. If you were starting to think that Microsoft might not be able to innovate enough to match the competition (including the smaller shadow I.T. solutions that users gravitate to for solving specific problems), well I for one am happy with how Office 365/SharePoint/etc. are shaping up for the next 5 years. Despite the occasional hiccup, the bet we all made on this technology still seems to be looking good :)

Next post – a look at PowerApps

Thursday, 26 November 2015

Podcast interview – the state of SharePoint development (end of 2015)

Office Dev podcastAlthough I managed to dodge this one on several occasions previously, I finally got round to recording an interview for Jeremy Thake and Richard DiZerega’s Office Dev podcast. I’d managed to duck this pretty consistently, despite seeing Rich in London and then Jeremy in Seattle recently – but, then the European SharePoint Conference in Stockholm came around, and that meant having to spend another few days with Jeremy, and my excuses just about ran out! Just kidding of course - it’s always a pleasure speaking to those guys, and frankly I’ll bang on about Office 365 and SharePoint development to anyone who will listen ;)

Jeremy’s a great interviewer, and I really enjoyed the chat. We covered topics ranging from the current outlook for Office 365 and SharePoint developers to “do’s and don’ts for developing on Office 365” (referencing one of my talks at the conference), and some of the differences between Office 365 apps and SharePoint Add-ins. I also discussed why I’m now typically encouraging my team to move away from provider-hosted SharePoint Add-ins – in favour of the pattern of using an authentication token from Azure AD with the SharePoint CSOM/REST, since this helps avoid some of the downsides of provider-hosted apps. We also dipped into some lighter topics too :)

Anyway, if you need something to listen to on your journey into work/workout/something else, you can get the interview at:

Office Dev podcast episode 72 - Chris O'Brien