Phone Handle Icon
Call Us
Back to all

Getting Started with Microsoft Cloud Development

September 28, 2021
By
Steve Danner
Back to all
Share this article

Many organizations have turned to the Microsoft 365 Platform for their business productivity needs. As such, developers need to be aware of how to develop, test and debug solutions against this platform. There are many sub-platforms, applications and features baked into this Microsoft 365, it is no longer just "Microsoft Office in the Cloud" as it originally was under the "Office 365" branding. Businesses now turn to Microsoft 365 as a means of offering up a turnkey business productivity suite to its employees. Historically, the products and features provided by Microsoft 365 would be installed onto on-premise servers separately. These servers were also maintained by an organization's IT department, creating a lot of maintenance overhead with hardware maintenance and underlying operating system maintenance. Microsoft 365 solves those logistical challenges for IT at large, but creates an interesting new challenge for software developers looking to build Line of Business (LOB) applications that tightly integrate with this platform. There's no shortage of material out there on how to write code to access the plethora of APIs that are offered by this platform, but how do we even get started doing this? We can't just write code against our Production Microsoft tenant! You'd have a lot of angry users and IT staff if you did that! How and where do we test our applications? How do we test deployments? Luckily, even in this brave new world of cloud-first everything, Microsoft continues to treat developers as first class citizens!

As Microsoft has continued to tout its Microsoft 365 Platform as the go-to productivity suite, there has been a growing necessity to stand up development environments from which developers can build, test and even create Line of Business applications. Lucky for us, Microsoft launched the Microsoft 365 Developer Program for this very purpose! Developers can sign up for this program to create a full-fledged Microsoft 365 tenant that they can completely control! You get 25 Microsoft 365 E5 licenses that will allow you to create "less privileged" users, allowing you to test all aspects of a Line of Business application baked into the platform!  The tenant comes complete with the ability to create Power Automate Flows, basic PowerApps, SharePoint sites and solutions, a custom domain with email enabled, and even a backing Azure Active Directory enabled! Note that Azure Active Directory is the actual data store for all of your Microsoft 365 Users and Groups, just as Azure is the platform on which all of Microsoft 365 runs, however, you do not get a whole free Azure tenant, it is pretty much limited to Azure Active Directory.

Setting Up

So unlike "normal" tenants, that are paid for directly, or obtained via a Microsoft MSP, developer subscriptions are automatically renewed (for free) every 90 days based on whether or not you are "actively developing" in the tenant. Unfortunately, the definition of "actively developing" is pretty nebulous, and clearly up for debate. I can personally speak that I have successfully had mine renewed, as I had been deploying custom SharePoint solutions to my tenant about 3 weeks before the original expiration date.

Signing up and using your tenant is easy! First, you sign up for the program using a personal or work Microsoft account. I used my Software Design Partners account without issue, but I've signed up with my personal account as well. Once you fill out the initial forms, you'll be presented with a "Developer Program" dashboard. From there, you will see a button to "set up E5 subscription", which will prompt you for your domain and initial username/password. Your "domain" will be a Microsoft domain such as "stevedanner.onmicrosoft.com". After that, you will be prompted to set up 2FA (2 Factor Authentication) with a phone number, and it will then create your Microsoft 365 Tenant!

Once you have your tenant, it opens up an entire environment for you to develop all kinds of custom solutions for the cloud! Just a few of the popular cloud applications included in your developer tenant are:

  • SharePoint
  • Forms
  • Teams
  • Azure Active Directory
  • Office Online
  • Power BI Pro
  • And many more...

A Custom SharePoint Solution

Let's use the Visual Studio 2019 SharePoint Add-In template to create a custom solution for SharePoint Online (SPO). Remember, this is our environment, so who cares if we mess something up, right?

First, let's get our Developer SharePoint site setup.  This template is necessary in order to be able to "side load" SharePoint solutions and debug them.  You can deploy custom solutions to any site, but the nice debugging experience is not possible with anything other than a Developer site. Go into your new tenant's SharePoint admin page by going to Microsoft Admin, then clicking "SharePoint" under Admin Centers. This should open up SharePoint Admin in a new tab. Now, click Sites/Active Sites and click the "Create" button at the top. In the slide-out panel, choose "Other Options". Under "Choose a Template", choose "More Templates" which will open the classic template selection window. Under collaboration, you should see the Developer template option available. Just choose it, give your site a title, URL and make yourself the Administrator of the site, and click OK.

Now, let's open up Visual Studio 2019 and create a new SharePoint Add-In. There is a template that ships with Visual Studio 2019 that can be utilized for this purpose. Create a new project, and select the "SharePoint Add-In" template.  When it asks you for your site URL, give it the URL of the site created above and make sure you choose the "SharePoint-hosted" add-in radio option as well.

New SharePoint Add-In

Click Next and it should prompt you to sign-in with your new tenant credential (the yourtenantname.onmicrosoft.com username). Once the project is created, it will open to a very simple Default.aspx page that we can edit very quickly and deploy to our SharePoint tenant. Go ahead and edit the content in the "PlaceHolderPageTitleInTitleArea" to "HELLO WORLD" and hit the Start button (F5) at the top. It will show several deployment steps taking place and will ultimately launch the web page inside of your SharePoint tenant!

Simple and easy, but effective because we haven't deployed this test page to our Production SharePoint environment! Once again, it's ours to do what we wish with!

Competitive Edge

The setup and deployment for custom solutions within most of these online applications is fairly similar. In most cases, there are toolchains available to package up your code with a custom file extension (for example, WSP or SPPKG for SharePoint apps), then the package can be uploaded to your Production tenant in an "App Catalog" area (which differs from application to application). The specifics for each app are beyond the scope of this document, and are fairly easy to find in Microsoft documentation. However, just having this entire Microsoft tenant at our disposal gives us the ability to upload and debug these packages in a test environment! You can even create more users that are able to log into your tenant and test out your custom applications! The logon procedures are identical to logging into Production Microsoft 365 environments, you simply log in with your "yourtenantname.onmicrosoft.com" username, and you will be signed into the Test/Development tenant instead! I find it useful to use another browser profile or another browser all together so that you are not constantly logging in and out of your Production and Development environments.

Hopefully this primer helps someone get a quick start into cloud first development on Microsoft 365. Remember, if you ever need assistance with Microsoft 365 development, Software Design Partners is your go-to partner to get you started, or do full implementations!