Saturday, November 7, 2015

Embed an Office Group Conversation into SharePoint Online using a JavaScript App, CORS, and the Office 365 Unified API

I am very happy to publish a post where I can use the brand new Office 365 unified API to embed a conversation of the brand new Office Group into a SharePoint Online page!

1 - Architecture
A SharePoint Online html page sends an Ajax request to the Office 365 Unified API and get the data of the Office Group.(The SharePoint Online site and the Office Group belong of course to the same Office 365 tenant).
It seems simple at first but it wasn't possible since recently. Why?
Because of the different hostheaders of the different part of Office 365, You can check while navigating through Office 365. For example, recently I created an Office 365 environment and first registered as contososoftware. My domain was Then I had to buy a domain to activate Yammer (You should have a verified domain in Office 365 to have Yammer activated to Enterprise. The "" is not a domain but an Office 365 tenant name or a default domain and cannot be used to activate Yammer Enterprise. So I bought
(roughly 14 US$ a year, not a big deal). After that, when I go to
  • My mail, My calendar, My contacts (people), My Tasks, the Url starts with
  • NewsFeed, OneDrive, Sites, Delve, Video, the Url starts with
  • Yammer, the Url starts with
  • a SharePoint Online site, the Url starts with
So if I want to deploy an html page somewhere Online in Office 365 and make an Ajax request to a part that has a different hostheader (for example displaying some of my mails into a SharePoint Online page), it normally doesn't work because crosss domain Ajax requests are forbidden by the browsers. It is worse if my HTML page is deployed on a server.
Cross-origin resource sharing (CORS) is a mechanism that allows that. CORS defines a way in which a browser and server can interact to safely determine whether or not to allow the cross-origin request. It allows for more freedom and functionality than purely same-origin requests, but is more secure than simply allowing all cross-origin requests. It is a recommended standard of the W3C. (Wikipedia)
Of course Microsoft sets up Cors within Office 365 in order developers to be allowed to performed Ajax requests without being bothered by the different hostheaders of Office 365.
The CORS of Office 365 is based on Microsoft Azure:
  • You register an App in Azure and you are provided with ID's that you place in your code.
  • In the Azure App, you also reference the Urls of the pages that are planned to call the Office 365 API with cross domain requests
This double registration allows the CORS of Office 365 to properly work and also manage the oauth authentication.

That leads to the fact that the term "Application" or App has a double meaning. It could be:
  • The pages that you have deployed somewhere on a server or within the Office 365 cloud (for example SharePoint Online) and that performs the Ajax requests and displays the data. Let's call this the physical part of the App, or the physical App
  • The Application that you had to add to Azure for getting the Office 365 CORS and the oauth authentication to work. Let's call that the virtual part of the App, or the virtual App
In the case of this tutorial, my physical App is just an html page added to a SharePoint Online team site using explorer mode (WebDAV protocol)
It is very similar of what I did when I embedded a Yammer conversation within SharePoint Online. This is super convenient because I can program and deploy quickly a physical App in Office 365 based on an html page that uses only Javascript!
It could seem a little bit difficult to understand at this point of the post, but I will explain all the operations to do it step by step with all the detailed screenshots as usual, so don't worry. I also did a diagram that can summarize all this in a clearer way:

2 - What you need to do this tutorial
You need:
Once you can access to an Office 365 environment using a business account with global administrator privileges, the first thing you need to do is register your application with Azure AD.

3 - Creating the (virtual) App within Microsoft Azure
3.1 Create a new subscription to Microsoft Azure
To Navigate to the Azure Portal you can use this link:
you can also access to it within 0ffice 365:
Log on to Office 365. From the Home page, select the Admin icon to open the Office 365 admin center.

In the menu page along the left side of the page, scroll down to Admin and select Azure AD.

If prompted, log in using the credentials you created for your O365 subscription.

After logging in, you should see a screen notifying you that you do not have a subscription

Create a new subscription.
If you're using a trial version of Office 365, you'll see a message telling you that Azure AD is limited to customers with paid services. You can still create a trial 30-day Azure subscription at no charge, but you'll need to perform a few extra steps:
Select your country or region, and then choose Azure subscription.
Enter your personal information. For verification purposes, enter a telephone number at which you can be reached, and specify whether you want to be sent a text message or called.
Once you've received your verification code, enter it and choose Verify code.
Enter payment information, check the agreement, and select Sign up.
Your credit card will not be charged.
Do not close or refresh your browser while your Azure subscription is being created.
Once your Azure subscription is created, choose Portal.
The Azure Tour appears. You can view it, or choose X to close it.
You should now see all items in your Azure subscription. It lists a directory with the name of your Office 365 tenant.

3.2 Register your App in Azure Management Portal

Once signed in, follow these instructions:
Click the Active Directory node in the left column and select the directory linked to your Office 365 subscription.

Select the Applications tab and then Add at the bottom of the screen.

On the pop-up, select Add an application my organization is developing.

Choose an explicit name for your app,(I took Embed-OfficeGroup), and select Web application and/or web API as its Type. Then click the arrow to continue.

The value of Sign-on URL is the URL where your application will be hosted. As I will call the App using JavaScript within a SharePoint page, I put the Url of my SharePoint site.
The value of App ID URI is a unique identifier for Azure AD to identify your app. You can use http://{your_subdomain}/{YourAppName}, where {your_subdomain} is the subdomain of .onmicrosoft you specified while signing up for your Office 365 Developer Site. Then click the check mark to provision your application. For example, my Office 365 global admin account is, in this tutorial case:

Now that your app has been provisioned, select the Configure tab.

Scroll down to the permissions to other applications section and click the Add application button.

In this tutorial, we want our App to read the conversation of an Office group. To access to the Office Group we have to use the new Office 365 Unified API.
Click the plus sign in the application's row and then click the check mark at the top right to add it. Then click the check mark at the bottom right to continue.

In the Office 365 Unified API row, select Delegated Permissions, and in the selection list, choose Read All Groups.

Click Save to save the app's configuration.

3.3 Configure your app to allow the OAuth 2.0 implicit grant flow

In order to get an access token for Office 365 API requests, your application will use the OAuth implicit grant flow. You need to update the application's manifest to allow the OAuth implicit grant flow because it is not allowed by default.
Select the Configure tab of your application's entry in the Azure Management Portal.

Using the Manage Manifest button in the drawer, download the manifest file for the application and save it to your computer.

Open the manifest file with a text editor. Search for the oauth2AllowImplicitFlow property. By default it is set to false; change it to true and save the file.

Using the Manage Manifest button, upload the updated manifest file.

You've now successfully registered your application with Azure AD.

4 - Coding the SharePoint page (physical App) that's using the Azure App (Virtual App)

4.1 Creating the app.html page

In your 0ffice 365 environment, create a new site collection. Once it's done, navigate to the "Site Assets" library. Open the library in Explorer mode

and using the window navigate to the root folder of your site. Create an html page within the folder and name it app.html

You can now open this page with Visual Studio or Notepad ++ and start to programm the displaying of the Office Group conversation

You can find the complete app.html page in the dedicated Github repository

4.2 Determine the resource endpoint

In order to make any API requests, you'll need to determine the correct endpoint of the resource you want to use. The endpoint you'll use is determined by what information you want from Office 365. Refer to the API reference documentation to get the endpoint you want.
Mail API reference
Contacts API reference
Calendar API reference
Files API reference
Alternatively, you can take advantage of the Office 365 unified API (preview) to access all of the APIs from a single endpoint, Refer to the Office 365 unified API reference to browse all of the supported endpoints.
For this sample, we will use the Office 365 unified API to get a conversation of an Office Group. The endpoint for this operation is{your_domain}/groups, where {your_domain} is the domain you specified while signing up for your Office 365 Developer Site. In my case

My endpoint is:

4.3 Get an access token from Azure

Office 365 uses OAuth 2.0 tokens issued by Azure AD to authenticate JavaScript clients. Tokens are obtained using the OAuth 2.0 implicit grant flow. Using implicit grant, your application requests an access token from Azure AD for the currently signed-in user by sending the user to an authorization URL where the user signs in with their Office 365 credentials and then is redirected back to the app with the access token in the URL.
The following function builds the authorization URL and navigates to it to begin the authentication process.

function requestToken() { 
  // Change clientId and replyUrl to reflect your app's values 
  // found on the Configure tab in the Azure Management Portal. 
  // Also change {your_subdomain} to your subdomain for both endpointUrl and resource. 
  var clientId    = 'e77659cc-bf72-4276-bd33-bdd876660a74';//ID of your App in Azure
  var replyUrl    = ''; //my sharepoint page that requests an oauth 2 authentification and data
  //It is also referenced in the REPLY URL field of my App in Azure
  var endpointUrl = '';
  //var endpointUrl = '';//getting files from SharePoint
  //var endpointUrl = '';//getting messages  from outlook
  var resource = "";
  //var resource = ""; //getting files from SharePoint
  //var resource = ""; //getting messages  from outlook
  var authServer  = '';  
  //var authServer  =  '';//this works either
  var responseType = 'token'; 

  var url = authServer + 
            "response_type=" + encodeURI(responseType) + "&" + 
            "client_id=" + encodeURI(clientId) + "&" + 
            "resource=" + encodeURI(resource) + "&" + 
            "redirect_uri=" + encodeURI(replyUrl); 

  window.location = url; 

At this point what's going on?
When I use this function, I am redirected to the same page, but with the acces token in the Url as a parameter:

I can even display the token

var urlParameterExtraction = new (function () { 
  function splitQueryString(queryStringFormattedString) { 
    var split = queryStringFormattedString.split('&'); 
    // If there are no parameters in URL, do nothing.
    if (split == "") {
      return {};
    var results = {}; 
    // If there are parameters in URL, extract key/value pairs. 
    for (var i = 0; i < split.length; ++i) { 
      var p = split[i].split('=', 2); 
      if (p.length == 1) 
        results[p[0]] = ""; 
        results[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " ")); 
    return results; 
  // Split the query string (after removing preceding '#'). 
  this.queryStringParameters = splitQueryString(window.location.hash.substr(1)); 

function displayToken(){
// Extract token from urlParameterExtraction object.
var token = urlParameterExtraction.queryStringParameters['access_token'];
alert('token : \n'+ token);

Now that I have the token, here is the code to request the Office 365 Unified API to get all the specific conversation of an Office Group:
function getToken(){

var token = urlParameterExtraction.queryStringParameters['access_token'];
return token;

function getGroupsFromO365() { 
    //var endpointUrl = ''; //getting all groups to get the ID of the group you want
 //var endpointUrl = '';//getting files from SharePoint
 //var endpointUrl = '';//getting messages from SharePoint
 var endpointUrl = "'4eba7454-b490-46ae-bb5e-774efaec7c6f')/conversations('AAQkADZjOTdkMTIwLWFjNTItNDUyYy05MTc4LTg1NmJmMDk1MjYxOQAQAD_Ql6WI-GlHs3VmVZsV3QA=')/threads('AAQkADZjOTdkMTIwLWFjNTItNDUyYy05MTc4LTg1NmJmMDk1MjYxOQMkABAAP5CXpYj8aUezdWZVmxXdABAAP5CXpYj8aUezdWZVmxXdAA==')/Posts";

    var xhr = new XMLHttpRequest();"GET", endpointUrl); 
    var myToken = getToken();
    // The APIs require an OAuth access token in the Authorization header, formatted like this: 'Authorization: Bearer '. 
    xhr.setRequestHeader("Authorization", "Bearer " + myToken); 

    // Process the response from the API.  
    xhr.onload = function () { 
      if (xhr.status == 200) { 
     //alert('data received');
  var message="";  
  var object = JSON.parse(xhr.response); 
  message+='From: ' + object.value[i].From.EmailAddress.Name + '<BR>';
  message+='At: ' + object.value[i].CreatedDateTime + '<BR>';  
  message+= object.value[i].Body.Content + '<BR>';  
        //var formattedResponse = JSON.stringify(JSON.parse(xhr.response), undefined, 2);
        document.getElementById("results").innerHTML = message;
      } else { 
        document.getElementById("results").textContent = "HTTP " + xhr.status + "<BR>" + xhr.response; 
    // Make request.
  catch (err) 
    document.getElementById("results").textContent = "Exception: " + err.message; 
Now, you can display this app.html into any SharePoint page by calling it within an iframe tag...
<span style="display:block;margin-bottom:3px;font-size;13px;">Embedded Office Group Conversation:</span> <iframe src="" style="height:400px;width=300px;border:solid 1px silver"></iframe>
As I did for this Web Part page;
5 - Aknowledgements

Friday, October 30, 2015

SharePoint 2016 Installation

Microsoft released the IT Preview of SharePoint 2016 on August 2015 24th. I will, as usual, post, a step by step installation guide for installing SharePoint 2016 in order to build a trial or development environment. The aim of this guide is to be as detailed as possible with all the screen shots in order:
  • non technical person (trainer, non technical IT pro, etc.) to be able to mount a trial environment.
  • All the installation will be on a single virtual machine
  • this tutorial will use the trial versions of the products (OS, SQL Server) so as trainers or developers to be able to build a SharePoint 2016 environment for free.
  • I will use the most simple features so as the installation to be as fast and simple as possible (sort of installation for dummies). For example, I will use the Administrator local account for installing all the softwares and to be the only service account (that is a very bad practice for a real environment)

1 - Deciding for the best configuration
If you check the post of Bill Baer, the SharePoint Senior Product Marketing Manager, that gives the recommendations, in our case, for a trial or development environment:

System Requirements

Deployment type and scale
Hard disk
Database server running a single SQL instance
Development or evaluation installation with the minimum recommended services
64-bit, 4 cores
12-16 GB
80 GB for system drive
100 GB for second drive

--> So be sure to have a computer with at least 16 Go of RAM with 200 Go of free disk space.

Operating System Requirements

SharePoint Server 2016 is supported on Windows Server 2012 R2 and Windows Server Technical Preview. Evaluation copies of both operating systems can be downloaded from the TechNet Evaluation Center:
--> For this tutorial, I will use Windows Server 2012 R2, because the version of SharePoint 2016 is already a preview. I don't take the risk of mixing 2 preview products (there is a known issue when using Windows Server 2016 Technical Preview 3 regarding the IIS role when running the SharePoint 2016 preview prerequisites Installation (thanks to Corey Roth).

SharePoint Database Server Requirements

SharePoint Server 2016 requires SQL Server 2014 for its databases. You can download SQL Server from the TechNet Evaluation Center at   In addition SharePoint Server 2016 will support SQL Server 2016.  For additional information on SQL Server 2016 see also

--> For this tutorial, I will use SQL Server 2014 , because as said before, the version of SharePoint 2016 is already a preview. I don't take the risk of mixing 2 preview products. (even if SQL Server 2016 seems to be much faster than SQL 2014)

2 - Creating the Virtual Machine
2.1 - Download Windows Server 2012 R2 Evaluation 
Start downloading a 180 days evaluation version of Windows Server 2012 R2. You will have to sign in to obtain.

Choose the ISO option

It is better to use an English version for an evaluation purpose so as to be sure to have the system messages in English. There is much more informations in the search engine for English messages.

To the question do you want System Center components included, choose "No".

Then, you can finally download the .ISO file of Windows Server 2012 R2

2.2 - Creating the Virtual Machine 
Download the VMWare player trial version

When VMWare is installed, open it and Click the "Create New Virtual Machine" button.

Then, add the reference to the .iso file of the Windows Server 2012 R2 OS you have downloaded. VMWare recognises the OS version automatically.

Then specify the Virtual Machine name and location.

Microsoft recommend 80 Go for the main hard disk. I let the automatic sizing set by VMWare regarding Windows Serve 2012 R2, because, if needed I know I can expand my disk. I chose to store the disk within a single file because it is better in matter of performances.

Then, VMWare is summarizing your first settings but you have to add some more regarding the hardware configuration.

First, start setting the memory as recommended by Microsoft, so at least 8 Go. (Of course it depends also on the amount you have in your Host Machine. Your host machine is your real computer).

Choose the same number of processors than in your host machine :

A good way to know the number or Cores is to open the task manager, and in the "Performances" tab, check the number of graphes... I have only one block so I have a mono Core in my host machine.

Deactivate all the devices you won't use, sound card, printer and so on. You don't need them for a trial or development environment...

Then, you can start installation. If you have a message 'You have an incorrect version of driver "vmci.sys"', open the machine .vmx file located in the virtual machine folder, locate the vmci0.present parameter and set it to FALSE.

The installation is starting loading the files...

Then, you are asked for chosing the langage settings...

Then you have to choose the type of Windows Server 2012 R2 OS you want... Choose a standard with GUI, and accept the License terms

After that you could choose the drive where install the OS but in our case as there is only one disk, we have no choice...

After having performed all that settings the installation is really starting...

It lasts roughly 10 to 20 minutes depending of the capacity of your host machine... Finally you are asked for setting the password for the Administrator account. Note : to do a ctrl Alt Del for a VMWare machine you have first to click on it then type ctr Alt and inser. You can also use the VMWare "Player" menu where this action is available.

When your Admin password is set, the system asks you to sign in.

and you finally can reach the machine with Windows Server 2012 R2 installed.

As your virtual machine will host SQL Server and SharePoint, you don't need to join a network, so click "No" to the right screen. So, it is done, you have a virtual machine with Windows server 2012 R2 on it, we just have to install SQL Server 2014 and SharePoint now, but before, let's perform some settings to improve the user experience of this trial or development environment and also preparing the installation of the other softwares (SQL Server 2014 and SharePoint 2016).

3 - Configuring the Windows Server 2012 R2 OS
3.1 - Installing VMWare tools 
VMWare tools gives to the Virtual Machine great features like resizing the virtual machine screen properly to adjust it to the screen fo your host machine and enabling the copy-paste feature from the virtual machine to the host one and vice & versa, so install the tools.
You can start the installation using the "Player" menu.

Then you have to give to the install program the authorization to run, on the next screens, just click "ok".

When the installation is finished you are asked for rebooting the vistual machine, just do it.

When the machine has restarted just minimize it and maximize it and you will notice that the virtual machine screen is now adjusting automatically to the host machine screen. Morevover, If you use the full-screen feature, you will have an experience as if the Windows Server 2012 R2 has been installed on your host computer!

3.2 - renaming the server
As you can notice, the server name is not friendly, so click on it to rename the server

Change the description and the server name (don't use a too long name since it is limited by the BIOS policy)

When it's done you are warned you will have to restart the server.

You will asked to "Restart now" when you will have clicked on the "Apply" button of the first modal window. Just do it

When your server are restarted you will notice that its name has changed...

3.3 - Disabling the Internet Explorer Enhanced Security
For a best experience using Internet Explorer disable enhanced security. Locate the link button.

Set everything to off.

When refreshing the dashboard you will notice that IE enhanced security has been set to Off.

3.4 - Disabling the Firewalls

Because we use a single virtual machine for trial or development matters, we can disable the firewall. Disabling the Firewalls will improve performances, and, furthermore, we won't have a warning regarding Firewall when installing SQL Server 2014. Thus, navigate to the Server Manager page and locate the "Windows Firewall" link button.

Click on it and on the opening pop-up, disable the Firewalls.

You will warn that it is not the recommended configuration, but, just don't care, our environment is for trial or development matters.

When closing the Firewalls configuration pop-up, you will notice that Firewalls has been deactivated properly.

3.5 - Adding the Microsoft .NET Framework 3.5 feature
We need .Net Framework 3.5 feature activated on the Server because SQL Server 2014 requires it. Let's activate this feature. Go to the Server Manager Dashboard, and click on "Add Roles or Features"

Pass the warning screen... and the two next ones

Then, select the Feature menu and check the Framework 3.5 option.

Start the activation of this feature...

You will obtain this screen when it is complete.

3.6 - Installing Microsoft the Service Pack 1 of the .NET Framework 3.5

SQL Server 2014 requires this Service Pack. Navigate to the Microsoft Download Center page for downloading this Service Pack 1

Download the package...

when it's downloaded run the installation. If it is not running, don't mind, it means that the feature on the server is already complete.

We can proceed to the installation of SQL Server 2014

4 - Installation of SQL Server 2014 on Windows Server 2012 R2
4.1 - Downloading the SQL Server 2014 SP1 180 days evaluation

Navigate to the Technet page to downlod the SQL Server 2014 SP1 180 days evaluation. You will be warned that you have to sign in.

Take care to choose the ISO file

and the 64bit type version of SQL Server 2014 + SP1

For a matter of testing, it is always better to choose the English products...

Then you finally can proceed to the download...

4.2 - Mounting the .iso image of the SQL Server 2014 SP1 on the Windows Server 2012 R2 virtual machine
When your .iso file is downloaded, mount it as the d:\ drive of your virtual machine. Start navigating to the CD settings via the "Player" menu;

then, browse for the SQL Server 2014 installation .iso file

When the .iso image is mounted click the Windows Server 2012 R2 start button.

Then, locate the "This PC" button and click on it.

You can see that the .iso image of the SQL Server 2014 + SP1 has been properly mounted.

We are now ready to install SQL Server 2014 + SP1
4.3 - Installing SQL Server 2014 SP1 on Windows Server 2012 R2

So, double-click on the SQL Server 2014 .iso image. The SQL Server 2014 installation wizard is launched. Then click on the installation menu item

And the first item of the new screen : New SQL Server stand-alone installation...

Pass the license screen since we use an evaluation version

and the license terms...

Then enable the automatic checking for updates...

Check that the first rules are passed

Let the first option checked for the next screen

Regarding the features, for SharePoint, you only need two : Database Engine Service and Management Tools - Basic

Pass the Feature Rules

Let the default option for the next screen. Don't use a named instance because it will be more complicated to install SharePoint with a named instance.

Let the automatic service account settings

Enable Mixed mode that allows you to use the "sa" account to connect. Set a complex password, like P@ssw0rd, if not you won't be able to pass this screeen. It is very useful sometimes to have this account in case of connection problem to SQL Server. Use the administrator account of the machine to be the administrator account of SQL.

SQL intallation wizard, then, summarizes your choices...

Then, launch the installation...

You should obtain this screen when installation is complete :

4.4 - Checking the Installation of SQL Server 2014 SP1 on Windows Server 2012 R2

We are now going to check if SQL Server has been installed properly. Click the Window Start button and when arriving in the Start Screen don't click anything, just type "SQL Server" on your keyboard. You will notice that the search input zone took your request automatically. At the bottom of the search results, you will see the SQL Server 2014 Managment Studio link. Click on it.

SQL Server 2014 Management Studio is openning...

All the connection parameters are automatically detected... So you just have to click to connect...

You, then, can check that the SQL 2014 Database Engine is working properly, and that you are able to see the Masters databases:

We are now finally able to install SharePoint 2016

5 - Installing SharePoint 2016 on Windows Server 2012 R2
5.1 - Downloading and mounting the .iso image of SharePoint 2016

First, here is the link to download the SharePoint 2016 preview... Start downloading the package on your host machine (your real computer)...
Don't close the download page because there is the product key of the SharePoint 2016 evaluation on it, or take care to back-up the product key before closing the page.

When it's done, mount the .iso image just as we did for the SQL 2014 Server .iso image previously:

Using the start menu, access to the "This PC" folder and locate the mounted .iso image for the installation of SharePoint 2016, and double click it.

Choose the HTA option for opening the SharePoint 2016 installation menu

5.2 - Running the SharePoint 2016 Products Preparation Tool (prerequisites installation)

Before launching the SharePoint tools be sure that your virtual machine can access the Internet because the tool will download a large amount of softwares. The SharePoint 2016 installation menu is opening... Click on install softwares prerequisites

First the SharePoint 2016 product preparation tool is summarizing the actions to be done...

Accept the licence terms...

The prerequisites are downloaded and installed by the SharePoint 2016 product preparation tool...

Finally, as we had properly configured the server, the prerequisites installation is successful. But you have to restart the server.

After restarting the server, configuration is definitively successfull.

Click on finish to close the SharePoint 2016 Products Preparation Tool. We are now really going to install SharePoint 2016.

5.3 - Installing the SharePoint 2016 binaries

Go back to the main SharePoint 2016 installation menu. This time click on "Install SharePoint Server".

Accept the license terms

Copy and paste the product key that was in the SharePoint 2016 preview download page.

Then, let the next config as it is since we have only one drive within our server...

The SharePoint 2016 binaries are the installed on the server...

At this point you can notice, that, on the server, the 14 and the 16 hive has been created. The 16 is for SharePoint 2016. The 14 seems to allow SharePoint 2010 to run on a SharePoint 2016 Farm. I will check this point.
As I don't see 15 folder, I imagine that you can completely run SharePoint 2013 within the SharePoint 2016 "16" folder... to be verified also...

And the SharePoint dll are in the new GAC (c:\windows\\assembly

5.4 - Creating the SharePoint 2016 Farm

If we had activated the Domain Controler Role within our server we could have an Active Directory and could follow the installation with the SharePoint wizard. But as we are using only one account (Administrator) that is a local account, if we try to create a SharePoint Farm referencing this account, we will have the following exception:

Local account should only be used in stand alone mode

The workaround is to use a shell instruction. so use the start menu and when arriving on the start screen type "SharePoint", in order to display all the SharePoint programs, and locate the SharePoint 2016 Management Shell. Click on it to open a command prompt...

Now it is the little touchy part for non technical people you have to type a command to create your SharePoint Farm :

psconfig.exe -cmd configdb -create -server sp2016-local -database SharePoint_Config -user Administrator -password YOUR password -passphrase P@ssw0rd -admincontentdatabase SharePoint_AdminContent -localserverrole SingleServerFarm

If you have followed this tutorial carefully and named the computer as I did, the only diference between your command line and mine is the Administrator account pasword. If your server name is different you will have also to update the server name.

Here are the screens you should obtain after executing the command :

After that, you will notice that the databases have been created:

Internet Information Services has been configured successfully also:

and same thing for the server services dedicated to SharePoint :

That is to mean: you have a SharePoint Farm running on your Server. Last thing to do: enable the SharePoint Central Administration to administrate the Farm and create new sites, new content, etc...

5.5 - Provisioning the Central Administration Site for the SharePoint 2016 Farm

Using the Start Screen of the server, type "SharePoint" to locate the SharePoint Products Wizard and launch it. The wizard detects the Farm we have just created.

Click next, and provide a number easy to remember for the port of the Central Admin Site (I always use 55555). Let the NTLM option checked.

Then, the wizard summarizes your choices...

Launch the wizard to provision the SharePoint Farm Central Administration Site...

You are warned that the configuration was successful

And when you close the window, the Central Administration Site is called... and you have first to answer to the participation at the Improvement Program

Then, you are asked for using a wizard to configure the services. Don't use it and cancel the wizard.

When closing the wizard the SharePoint 2016 Central Administration Site is finally displaying...

Don't mind for the health analyzer issues. It is normal because we didn't follow the best practices since we wanted to quickly mount a trial SharePoint environment.
You have anyway installed SharePoint 2016 on premises successfully. Well done!

6 - Testing the SharePoint 2016 installation on Windows Server 2012 R2
6.1 - Creating a new Web Application
On the SharePoint 2016 Central Administration locate the "Manage Web Applications" link button and click on it.

Using the "New" button of the Ribbon diplay the pop-up for creating a new web application.

On the pop-up, let all the automatic settings except the content database name

When the Web Application is created this pop-up is displaying:

When you close it you can notice that the Web Application has been created succesfully.

6.2 - Creating a new Site Collection
Close the Pop-Up, go back to the Central Administration Home page and this time click on the "create site collections" link.

Just populate the site name and choose your Admin account as the Site Collection primary administrator.

You are then warned that the Site Collection has been successfully created...

And when you click the new Site Collection link you are redirected to its landing page.

You can now be sure that your SharePoint 2016 installation is working properly.