OneDrive for business is the document library, which is available within My Sites in SharePoint Server 2016, so as to centrally store the documents for sharing and for collaboration. Thus OneDrive provides a central repository for the document collaboration.
If we click on the OneDrive option in the Navigation Bar, it will take us to the OneDrive location within My Sites.
However as a part of Hybrid Features in SharePoint Server 2016, we can redirect the users to OneDrive for business in Office 365 when they click OneDrive on SharePoint 2016 navigation bar.
In this article, we will see how to set up hybrid OneDrive for business in Office 365.
Before setting up hybrid OneDrive for SharePoint Server 2016, we have to ensure the following.
- Office 365 environment is configured for Hybrid setup.
- Ensure that the required Services are up and running in SharePoint Server.
Office 365 Prerequisite Configurations
The configuration that has to be done in Office 365 side is already covered in some of the previous articles, as shown below.
SharePoint Server 2016 Prerequisite Configurations
As a part of setting up the prerequisites in SharePoint Server 2016, we will have to ensure the successful provisioning of the following.
- Managed Metadata Service Application
- User Profile Service Application
- My Sites
- App Management Service Application
- Subscription Setting Service
- Setup Synchronization connection with Active Directory Services
We will cover the SharePoint Side Configurations in this article.
Managed Metadata Service Application
As the first step to configure the SharePoint Server 2016 environment, we have to create the managed metadata Service Application from the Manage Service Applications page.
Enter the Service Application name, Database Server, Database name and Application Pop, which will be used with the Service Application.
Clicking OK will start provisioning the Managed Metadata Service Application.
Setting up My Sites
In order to set up My sites we can create a new web application that will host the sites. It can either use a separate application pool or use a stand-alone one. There are no extra settings that have to be done during the web application creation. The default settings are good enough. From the web application creation page, create a new web application. Provide the IIS Site name, Port number, Application Pool, Database server and Database name.
Click OK. This will start provisioning the Web Application.
Once the Web Application is created, click ‘Create Site Collection’ option.
This will provide the option to create the site collection that will hold My Sites. Specify the site collection name and select the template “My Site Host” from Enterprise tab.
This will complete the creation of the My Site, Site collection at http://vm03-sp2016:25000/
Once you have My Site Web Application and Site collection in place, ensure that you create a managed path for the sites. In order to do it, head over to the Web Application, which was created recently and select Managed Paths.
Add the managed path personal in the text box and select Wild card inclusion from the type drop-down. Click OK. This will create a managed path in the Web Application under which all My Sites will be created in the future.
Setting up User Profile Service Application
We can provision the user profile Service Application from the Manage Service Applications Page.
Once the User Profile Service Application is selected, it will provide the page, where we can specify the Service Application Name, Application Pool, Application Pool Account, Database Server and Database Name.
Specify My Site Host URL, which was created earlier and leave My Site Managed Path as /Personal. This is the managed path, which we had created in the earlier step.
Click OK. This will complete the provisioning of the user Profile Service Application.
App Management Service Application
The next Service Application, which has to be set up is the app management Service Application. Head over to the Manage Service Applications page and from the New drop-down, select app management Service.
This will open up the page, where we can specify the app management Service Application Name, Database server, Database Name, Application Pool and the Application Pool account.
Click OK to start the provisioning of the Service Application.
This will create the app management Service Application.
Subscription Settings Service Application
The last Service Application, which has to be created is the Subscription Settings Service Application. This cannot be created directly from the central administration and has to be provisioned, using PowerShell. To do it, spin up SharePoint 2016 Management Shell as an Administrator.
Ensure that you have a managed account in place. Run the commands, mentioned below to provision the Subscription settings Service Application.
- $account = Get - SPManagedAccount "AzureAD\SPFarmAccount"
- $appPool = New - SPServiceApplicationPool - Name 'Subscription App Pool' - Account $account
- $SubscriptionSvcApp = New - SPSubscriptionSettingsServiceApplication - ApplicationPool $appPool - Name 'Subscription Settings Service Application' - DatabaseName 'SubscriptionSettings_ServiceDB'
- $SubscriptionSvcproxy = New - SPSubscriptionSettingsServiceApplicationProxy - ServiceApplication $SubscriptionSvcApp
-
- if ('this_is' == /an_example/) {
- of_beautifier();
- } else {
- var a = b ? (c % d) : e[f];
- }
This will provision the Subscription Settings Service Application.
Now, we have to enable the Subscription Settings Service. From System Settings, select Manage Services in this farm.
This will list all the Services available within the farm. By default, Microsoft SharePoint Foundation Subscription Settings Service is disabled in the farm. Change it to Yes to provision the Service.
Configure Synchronization Connection
In order to set up hybrid OneDrive, we have to create a synchronization connection with Active Directory Domain Services for the User Profile Service Application. In order to do it, head over to the Manage User Profile Service Application and select Configure Synchronization Connections option.
Click Create New Connection to set up a new Synchronization Connection.
Specify the connection name and select the type as Active Directory Import. Mention the connection string, which will be the Full Qualified Domain Name. Leave the Authentication Provider Type as Windows Authentication. Account Name and Password have to be the credentials of the Domain Administrator.
Click Populate Containers. This will populate the Domain Objects. Select the Users node and click OK.
This will complete the setting up of the Synchronization connection.
Verify the User Properties before running Synchronization
Now, let’s head over to the Manage user Properties option from the People tab. We have to verify the User Profile Properties before running the synchronization connection.
We will check for User Principal Name and Work Email. User Profile Name should be mapped to userPrincipalName and Work Email should be mapped to the mail. However, the mapping property is blank, as shown below.
Thus, let’s add the mapping for User Principal Name. Select Edit.
In the attribute text box, specify the mapping “userPrincipalName” and click Add.
The new mapping has come up in the page.
Similarly the Work Email mapping is missing. Thus, edit the property as well.
Add the mapping mail in the attribute text box and click Add.
Thus, we can see both the properties, which have been mapped.
Start Profile Synchronization
The user profile property mappings have been verified. Now, we have to synchronize the UPN domain suffix and E-mail address, which we configured in Active Directory Domain Services. In order to do it, select Start Profile Synchronization option from the Synchronization tab.
Select “Start Incremental Synchronization” and click OK.
To the right of the Manage Profile Service Page, you can see the Synchronization Settings summary.
Setup User Permissions to access One Drive for Business
In order to use OneDrive for business in Office 365, the users of the SharePoint Site must be having “Create Personal Site” and “Follow People and Edit Profile” permissions. Both are controlled by the user permissions in the User Profile Service Application. Thus, let’s head over to the Manage User Permissions section in the People tab and grant the required access.
Select the permissions, mentioned below for the authenticated users and click OK.
Get Office 365 My Site
Before configuring OneDrive for business link, we have to get the URL for My Sites site collection in SharePoint Online, so as to find the My Sites URL in Office 365, click SharePoint from the Admin Menu. In the Site Collections list, get the site collection URL, which contains <domain>-my.sharepoint.com.
In my case, it is https://ctsplayground-my.sharepoint.com. As the final step, let’s head over to Office 365 tab in central administration and select “Configure hybrid OneDrive and Site features”.
Enter SharePoint Online My Site URL in the My Site URL section. Select the radio button “One Drive Only” in the Hybrid features section.
Let’s test the One Drive for business, which is redirected by clicking on OneDrive link.
This will take us to Office 365 login page.
Once authenticated, we can work on Office 365 OneDrive.
References https://technet.microsoft.com/en-us/library/mt147425(v=office.16).aspx
Summary
Thus, we have successfully set up OneDrive for business in Office 365 Redirection from SharePoint Server 2016.