IT Pro Resources
Bill Baer on...
Recently we introduced a number of new coexistence scenarios in Service Pack 1 including redirection of OneDrive for Business and Yammer. Redirection of OneDrive for Business enables IT to provision cloud storage for users OneDrive for Business document libraries; however, in a hybrid scenario the content in that storage should be discoverable both on-premises and online. The most common configuration to support OneDrive for Business redirection is an outbound search topology where users can return results from both on-premises and online within the on-premises search portal.
NOTE Office 365 returns only local results.
The steps below assume a hybrid identity infrastructure is configured for the target environment. The hybrid identity infrastructure can be:
See also Configure identity management for a hybrid topology in SharePoint Server 2013 [http://technet.microsoft.com/en-us/library/dn197169(v=office.15).aspx]
On one or more Web servers install the following prerequisite software:
Server-To-Server authentication in hybrid environments between SharePoint Server 2013 and Office 365 creates a trust relationship between SharePoint Server 2013 and a SharePoint Online Tenant. In this scenario Windows Azure Active Directory provides the trusted signing service.
The Security Token Service (STS) is the service component that builds, signs, and issues security tokens according to the WS-Trust and WS-Federation protocols. Replacing the STS certificate in SharePoint Server 2013 is necessary to establish trust between the Security Token Service of SharePoint Server 2013 and the SharePoint Online Tenant. Replacing the STS certificate enables the STS Service and Windows Azure Active Directory to sign security tokens for authenticated users.
NOTE The steps below should be used in pilot/development/lab environments. A certificate provided by a known CA should be used in production environments.
Open Internet Information Services (IIS Manager) on Web server:
A Personal Information Exchange certificate that is issued by a signing authority and verifies the authenticity and security of the hosted service (can be a self-signed certificate for testing purposes). The format of this certificate uses a .pfx extension.
Open Internet Information Services (IIS Manager) on a Web server:
In Internet Information Services (IIS Manager) select the Self-Signed Certificate created in the previous steps.
Server-to-server authentication allows for servers that are capable of server-to-server authentication to access and request resources from one another on behalf of users. Servers that are capable of server-to-server authentication run SharePoint 2013, Exchange Server 2013, Lync Server 2013, Azure Workflow Service, or other software that supports the Microsoft server-to-server protocol.
Configuring server-to-server is necessary to service incoming requests from another SharePoint 2013 server farm or service where the primary SharePoint 2013 server farm trusts the send farm. The following steps use the New-SPTrustedSecurityTokenIssuer CmdLet to configure the trust relationship by providing the JSON metadata endpoint of the sending farm.
Open the SharePoint 2013 Management Shell:
NOTE The remaining steps in this article will be executed within this SharePoint 2013 Management Shell dialog.
$PFXCertificate = ���<Drive:\Path>” $CERCertificate = “<Drive:\Path>” $PFXCertificatePassword = “<password>” $RootDomain = *<Root FQDN>.com (I.e. *.corp.contoso.com) NOTE In this example the domain FQDN is wbaer.com.co (see below). $RootSite = Get-SPSite <Top-Level Site Collection> (I.e. http://sharepoint.corp.contoso.com) $Site = Get-SPSite $RootSite $SPOAppId = "00000003-0000-0ff1-ce00-000000000000" $SPOContextId = (Get-MsolCompanyInformation).ObjectID
$PFXCertificate = ���<Drive:\Path>”
$CERCertificate = “<Drive:\Path>”
$PFXCertificatePassword = “<password>”
$RootDomain = *<Root FQDN>.com (I.e. *.corp.contoso.com)
NOTE In this example the domain FQDN is wbaer.com.co (see below).
$RootSite = Get-SPSite <Top-Level Site Collection> (I.e. http://sharepoint.corp.contoso.com)
$Site = Get-SPSite $RootSite
$SPOAppId = "00000003-0000-0ff1-ce00-000000000000"
$SPOContextId = (Get-MsolCompanyInformation).ObjectID
Updating the Security Token Service Certificate requires initializing a new instance of the X509Certificate2 class using a certificate file name and a password used to access the certificate in addition to the X.509 format version of the certificate prior to importing the signing certificate.
In the SharePoint 2013 Management Shell at the C> prompt enter:
$STSCertificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $PFXCertificate, $PFXCertificatePassword, 20 Set-SPSecurityTokenServiceConfig -ImportSigningCertificate $STSCertificate
$STSCertificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $PFXCertificate, $PFXCertificatePassword, 20
Set-SPSecurityTokenServiceConfig -ImportSigningCertificate $STSCertificate
NOTE Enter [Y]es when prompted to replace the certificate.
In order to properly update the STS with the new certificate in the command prompt enter:
IISRESET and allow the service to restart
NET STOP SPTimerV4 and allow the Timer Service to stop
NET START SPTimerV4 and allow the Timer Service to start
$STSCertificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList $PFXCertificate, $PFXCertificatePassword
$PFXCertificateBin = $STSCertificate.GetRawCertData()
$Certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$CERCertificateBin = $cerCertificate.GetRawCertData()
$CredentialValue = [System.Convert]::ToBase64String($CERCertificateBin)
Enter [A] Yes to All when prompted.
$Credentials = Get-Credential
Connect-MsolService -Credential $Credentials
Import-Module MSOnline -force Import-Module MSOnlineExtended -force
New-MsolServicePrincipalCredential -AppPrincipalId $SPOAppId -Type asymmetric -Usage Verify -Value $CredentialValue
$SharePoint = Get-MsolServicePrincipal -AppPrincipalId $SPOAppId
$ServicePrincipalName = $SharePoint.ServicePrincipalNames
Set-MsolServicePrincipal -AppPrincipalId $SPOAppId -ServicePrincipalNames $ServicePrincipalName
$SPOAppPrincipalId = (Get-MsolServicePrincipal -ServicePrincipalName $SPOAppId).ObjectID
$SPONameIdentifier = $APOAppPrincipalId@$SPOContextId
Windows Azure Active Directory Access Control is a cloud-based service that provides an easy way of authenticating and authorizing users to gain access to your web applications and services while allowing the features of authentication and authorization to be factored out of your code.
In a hybrid topology rather than implement an authentication system with user accounts specific to the application, ACS orchestrates the authentication and authorization of users.
$AppPrincipal = Register-SPAppPrincipal -site $Site.rootweb -nameIdentifier $SPONameIdentifier -displayName "SharePoint Online"
Set-SPAuthenticationRealm -realm $SPOContextId
New-SPAzureAccessControlServiceApplicationProxy -Name "ACS" -MetadataServiceEndpointUri "https://accounts.accesscontrol.windows.net/metadata/json/1/" -DefaultProxyGroup
New-SPTrustedSecurityTokenIssuer -MetadataEndpoint "https://accounts.accesscontrol.windows.net/metadata/json/1/" -IsTrustBroker -Name "ACS"
Open SharePoint 2013 Central Administration to confirm Trust is configured:
In order to surface content stored in SharePoint Online / OneDrive for Business a new Results Source and Query Rule are required on the SharePoint Server 2013 on-premises environment. Optionally, where only OneDrive for Business is cloud-enabled, a new search vertical may be sufficient; however, in the event additional workloads to include general collaboration will be considered for the cloud, a base Results Source / Query Rule should be configured to aggregate results across all site collections (including OneDrive for Business) where a OneDrive for Business Result Type can be further configured for refinement.
Result sources in SharePoint limit searches to certain content or to a subset of search results. SharePoint Server 2013 provides 16 pre-defined result sources. The pre-configured default result source is Local SharePoint Results. In these steps a new Results Source will be created for Remote SharePoint in order to discover content stored in SharePoint Online / OneDrive for Business.
Open SharePoint 2013 Central Administration:
Query Rules in SharePoint help searches respond to the intent of users through conditions and correlated actions. For example, when a query meets the conditions in a query rule, the search system performs the actions specified in the rule to improve the relevance of the search results.
NOTE This query rule will apply to all sites. To make one for just a specific site, use the query rules page in its Site Settings
Combining an outbound hybrid search topology with OneDrive for Business redirection in Service Pack 1 provides on-premises users of SharePoint Server 2013 visibility to content stored in OneDrive for Business libraries in Office 365 improving discovery and manageability of cloud content.
Implementing DirSync with Password Sync reduces overall complexity and provides an integrated authentication experience to support rapid provisioning of cloud storage.
Hybrid for SharePoint Server 2013 [http://technet.microsoft.com/en-us/library/jj838715(v=office.15).aspx]
Display hybrid search results in SharePoint Server 2013 [http://technet.microsoft.com/en-us/library/dn197173(v=office.15).aspx]
Excellent write up!