Category Archives: sharepoint online

Mail Addin For Outlook Using Office 365 APIs (ADAL.js, AngularJS, WebApi, Azure AD)

In this blog post you’ll see an example of Mail Add-in for Outlook. I was just working with Office 365 APIs and this is just something that I’ve decided to share. It should be seen as a simple example of how we can consume data that Office 365 APIs provide.

The authentication is taken care of with the “new” Javascript library ADAL.js (Active Directory Authentication Library for Javascript), AngularJS for frontend, .NET WebApi and Node.js for backend.

Context – Mail Addin for Outlook providing data from O365 APIs and custom REST APIs

What this sample Mail Add-in for Outlook does

  • Consumes Office 365 Mails API  – showing related emails to current – one that we’ve are just looking at


  • Consumes Office 365 Files API – showing related files to current email – one that we’ve are just looking at


  • Provide data from custom REST API – showing Employees of a company found in email based on domain name
    • Employees are potentially saved in external system
    • REST API has enabled Odata filtering


  • Provides data from custom REST API – showing fictional financial Reports of a company found in email based on domain name
    • Financial Reports are potentially saved in external system
    • REST API has enabled Odata filtering


Code and all required steps to build the project are available in GitHub repository ( Next step is to rewrite the whole project into Typescript, which will hopefully be done in next week or so – with Typescript we get all the benefits of strongly typed languages like C#, it’s definitely worth to check it out.

Introducing ADAL JS v1 by Vittorio Bertocci
ADAL JS & CORS with O365 APIs (Files & SharePoint) by Andrew Connell
Continuous deployment using GIT in Azure App Service By Cephas Lin


Things you should know about the Public Website template in Sharepoint Online (Office 365)

If your business is in need of a simply presented website (like one of these) you can consider your Office 365 for Business tenant as CMS and hosting provider.

Office 365 for Business comes with an option to create one Site Collection as Public Website. Creating custom masterpages and publishing them became a lot easier with the new version of Sharepoint 2013/Online (Sharepoint Online is part of Office 365). Mapping an existing or new Domain name is fairly easy as well. By default you get built-in integration with GoDaddy. It is hard to believe, but this just works as expected. Wizard does all the hard work for you.

Why you should consider this?

Because to host a web site you need a hosting provider and the cheapest is at least 50€/year. You might say – I will just host a web site in AzureI get 10 web sites for free. That is an option. But to map a Domain on your “free” web site you will first need to change hosting type from Free to Shared. You should also consider that Office 365 ( + Sharepoint Online) is CMS as well. End-user, by default, gets an ability to edit a website on their own – no developer needed … Etc.

There are limitations:

What do I mean with limitations? – There are features that you get on On-prem Sharepoint 2013 and don’t get on Sharepoint Online (Office 365 for Business).  See more: Feature Comparison

Limitations of Sharepoint Online (on day: 15.9.2014):

  • No Clean Url manipulation for each page
  • No Term Store manipulation
  • No Cross Site Publishing
  • No Search functionality (Content By Search Web Part)
  • No Sub Sites(SPWebs)
  • Etc. .. go to Site Settings for more.

So if you’re considering using these features and they are the requirement, my advice to you – start requesting features on UserVoice (Microsoft is listening to user request). If there is a decent amount of votes for a specific feature, they might put an effort into building it, eventually include it. There are already a couple of features that were added just because of user demand.

This post will be updated over time. Public Website template might receiving new features.



How to Publish A Custom Web Design On Sharepoint Online (Office 365) Public Web Site

Below are the steps you must take to create and publish a custom design to Sharepoint Online Public Website:

  1. Create Public Website Collection in Office 365 Tenant
  2. Map network drive
  3. Upload files (html,js,css,images)
  4. Create Master page using Design Manager
  5. Publish changes and new Master page
  6. Set Master page

Create Public Website Collection in Office 365 Tenant

Skip this step if you have already created a public web site collection

  • Navigate to Site Collections under Sharepoint Admin Center (Navigation > Admin > Sharepoint > Site Collection)
  • Select New – option from Ribbon. Next – select Private Site Collection.
  • Confirm settings – create new public website
    Note: you can have only one Public Website per domain.

Map Network Drive

Maping network drive to Sharepoint Online/Office 365 site collection/document library is already well documented process so I will just provide link to an MSDN article –

In general, the steps below should do the necessary:

  • Select the Keep me signed in check box*
  • Add your SharePoint Online sites to trusted sites*
  • When you map the new network drive use the URL of the newly created public website,
    URL will probably be in a format similar to this – https://<tenant-name>
    Note: Write a comment if you have problems with this step

Upload Files

What you really need to do is just copy files to network drive. Design files are usually found in the folder under <site-collection-url>/catalogs/masterpage/<new-folder>. Create a new folder and paste/move files.

Create The Master Page Using  Design Manager

  • Go to Site Settings – Design Manager under Look and Feel Group (Public Website Collection > Site Settings > Design Manager) or just add this to the URL of a Site Collection – _layouts/15/DesignMasterPages.aspx
  • On the left side of the new window select Edit Master Page
  • Select Convert an HTML file to a Sharepoint master page
  • Navigate to the HTML file you will convert to the Masterpage
  • If conversion succeeds you will be notified in the Status field
    Note: In case of failed conversion follow error message – most of the time they are really descriptive and helpful

Publishing Changes And New Master Page

Check In every single file you need for this design to be visible from the web and Anonymous users to see. Since Sharepoint Online is missing a feature of Multi Select-Check-In (this is something that Sharepoint On-premise has no problem doing), you should just use Sharepoint Designer, unless you have the time and energy to Check-In all the files one by one. I doubt that.

  • Install > Open Sharepoint Designer
  • Open Site Collection of Public Website
  • Go to folder where the files are (_catalogs/masterpage/<folder>)
  • Select files > Check In > Publish
  • Note: You will still need to go over every folder – you can’t select a folder an Check-In/Publish all the files it contains #fail

Set Master Page To Site Collection

  • Go to Site SettingsMaster Page (under Look and Feel Group)
  • Select Master page next to: Specify a master page to be used by this site and all sites that inherit from it:
  • Note: If master page file has no errors and master page (.html) was Checked-In you should be able to see it from drop down control

Give us a feedback in comments below. Thanks!