Administration, Hybrid, SharePoint

Yammer Redirection in SharePoint Server 2013 Service Pack 1

In previous articles I discussed redirecting OneDrive for Business to Office 365 in SharePoint Server 2013 Service Pack 1.  In addition to new functionality that allows IT administrators to redirect OneDrive for Business and Sites pages to Office 365, Service Pack 1 also allows IT administrators to activate Yammer as the default social experience for SharePoint Server 2013.

When activated, the Newsfeed link in the navigation bar is replaced with a Yammer link that directs users to the organizations’ Yammer network. 

Yammer Configuration page in Central Admin

While a simplified Activate/Deactivate configuration is provided in Service Pack 1, proper identity management planning is required to deliver a consistent and integrated user experience.

For organizations with an established Active Directory and identity management infrastructure and practices

Directory Synchronization with Office 365 is a distinct configuration that provides an integrated identity solution for applications within the Office 365 suite with the exception of Yammer.  Integrated identity with Yammer requires a separate implementation of a directory synchronization solution provided by Yammer, Yammer Directory Sync (DSync).

Similar to Directory Synchronization, Yammer Directory Sync (DSync) is a Windows application that automates user provisioning in your Yammer network by querying your Active Directory (AD) host(s).

 

Sites Page

The Sites page introduced in SharePoint Server 2013 is designed to provide users a unified location to create new sites and view sites they are following.

Managing Sites Page Redirection

Service Pack 1 also includes within OneDrive for Business redirection the option to redirect users Sites page to Office 365.

Example 1 C#

        static void Main(string[] args)
        {
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://sharepoint.spc.com.co"));
 
                foreach (SPSite site in webApp.Sites)
                {
                    foreach (SPWeb web in site.AllWebs)
                    {
                        if (web.Features != null)
                        {
                            web.Features.Remove(new Guid("{043C4BDD-9745-441a-A9A7-0BCD9B910319}"));
                        }
                    }
                }
            });
        }

Example 1 Windows PowerShell

This example can be used to deactivate a specific Feature across all sites within the specified Web application.

$webApp = Get-SPWebApplication -Identity http://sharepoint.contoso.com

$webApp | Get-SPSite -limit all | ForEach-Object {Disable-SPFeature -Identity “FeatureName” -Url $_.Url}

The Uninstall-SPFeature cmdlet removes the specified feature definition from the collection of feature definitions in the farm.

Uninstall-SPFeature –Identity

Other Social Capability Considerations

In addition to addressing scenarios such as Following Content you should also consider the management of other SharePoint Server 2013 social capabilities such as:

  • Removing the SharePoint Server social web parts from My Sites and Team Sites.
  • Hiding user interface controls that provide social functionality.

For additional information on replacing the social features in SharePoint Server 2013 with equivalent Yammer features in a SharePoint Server 2013 on-premises deployment see also http://technet.microsoft.com/en-us/library/dn270535(v=office.15).aspx.

Resources

Add Yammer to the navigation bar for SharePoint 2013 [http://technet.microsoft.com/en-us/library/dn627521(v=office.15).aspx]

Standard
Hybrid, SharePoint

SharePoint 2013 and Office 365 Hybrid

The French philosopher, Henry Bergson, once said “to exist is to change, to change is to mature, to mature is to go on creating oneself endlessly.” While the Nobel Prize winner wasn’t talking about the software and services world, the thought is extremely applicable to technology- from development to administration to use. The adoption of, and change to, cloud computing is maturing at a rapid rate…but the move needs to be thoughtful.

At Microsoft we are truly embracing this change through our cloud first/mobile first mantra and we have seen customer interest grow for all of our maturing cloud services, in a very significant way- from IaaS capabilities in Microsoft Azure, to gaming and entertainment consumption in XBOX Live to our productivity and collaboration solutions for Office 365. In all cases, customers love the time to value, cadence of new and helpful features and predictive costs that the cloud computing offers.

However, we also know that the move to cloud doesn’t happen all at once. In Office 365, we have seen incredible interest and growth for all of our services, including SharePoint Online. To that end, we absolutely recognize customers need to balance their desire to adopt SharePoint Online, while still maintaining existing, on-premises, SharePoint Server investments until the time when they can be migrated to the cloud.

For those customers ready to thoughtfully embrace the change to cloud, we are committed to helping you with our hybrid models and tools so you can leverage the Microsoft Cloud to change your business endlessly. We believe the future of work is how we build relationships, share information, and respond to conditions that can change at a moment’s notice, Office 365 is the cornerstone of our response, and with our current and future investments we’re helping to bring you there with as little friction as possible.

For more information and to understand what hybrid scenarios can do for your business see the following resources:

Check out new downloadable content you can share with your organization at http://technet.microsoft.com/en-us/library/dn769084(v=office.15).aspx

Learn more about Hybrid Models with SharePoint and Office 365 [http://technet.microsoft.com/en-us/library/jj838715(v=office.15).aspx]

Download Hybrid SharePoint 2013 Resources [http://technet.microsoft.com/en-us/library/jj838715(v=office.15).aspx]

Check back often as we continue to innovate on our hybrid vision to help you realize the best of on-premises and the cloud.

Standard
OneDrive for Business, SharePoint

Code Samples, Simple Translation using CSOM, REST, and Machine Translation Services

Machine Translation Services is a powerful Shared Service Application in SharePoint Server 2013 that provides automation synchronous and asynchronous translation of documents, folders, and sites.  The code samples in this post provide simple examples of synchronous document translation using the Client Side Object Model in managed (C#) applications and Windows PowerShell in addition to accessing Machine Translation Services via REST.

CSOM

The Client Side Object Model (CSOM) provides a rich alternative to earlier Web Services in providing an object-oriented system for interoperating with SharePoint data from a remote (client) machine.

The foundation of CSOM interop is the client context object which represents the current request context.  In the provided samples, it is represented in the C# example as:

new ClientContext(site)

or in the Windows PowerShell sample as:

New-Object Microsoft.SharePoint.Client.ClientContext($url) where the $url in this example is a parameter passed to the script.

Through this context you can obtain access to client objects to include site collections and their subordinates as represented in the above examples.

For example, in the sample scripts (download link below), the top-level site collection represents the new client context which is passed to the SyncTranslator class of the TranslationServices namespace as the Context property.

$context = New-Object Microsoft.SharePoint.Client.ClientContext($url)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
$context.Credentials = $credentials

$job = New-Object Microsoft.Office.Client.TranslationServices.SyncTranslator($context, $language)

REST

REST or Representational State Transfer in the context of SharePoint 2013 development opens it to standard Web languages and technologies.  Technologies such as CSOM (as shown above) have been available to SharePoint over several releases; however, such APIs are limited to .NET applications and languages.  REST; however, enables accessing SharePoint capabilities and entities with standard Web languages such as JavaScript and preprocessor hypertext (PHP) in addition to any technology stack that supports REST.   One of the predominant benefits of REST is that it allows for limiting the footprint of Web applications, as such, reduces the barrier to entry to accessing cloud services and deploying applications whose target is such.

In SharePoint the REST service is implemented in client.svc contained within _vti_bin; however, through substitution _api is used and establishes the base Url for each endpoint.

The service Url of specific endpoints is appended to the base Url, in the sample code:

$request = [System.Net.WebRequest]::Create($url +"/_api/TranslationJob.EnumerateSupportedLanguages")

These samples are intended to illustrate how Windows PowerShell can be used to access cloud services through CSOM and REST.

Download the samples here:

CSOM (Windows PowerShell and C# Samples)

REST (Windows PowerShell Samples)

Standard
Administration, OneDrive for Business

File and Folder Considerations with OneDrive for Business [UPDATED 12/10/2014]

Updated 8/12/2014 – Removed & as an illegal character.  & character is now supported with OneDrive for Business sync client and Web UX.

Updated 8/22/2014 – Updated to include prohibited types per http://office.microsoft.com/en-us/office365-sharepoint-online-small-business-help/types-of-files-that-cannot-be-added-to-a-list-or-library-HA101907868.aspx.

Updated 8/23/2014 – Updated to include optional UI-based scanning (FileCheckerUI.exe).

Updated 8/31/2014 – Updated FileChecker.exe (integrated desktop and command line application).

Updated 12/10/2014  Updated to remove prohibited characters {, }, [, ], ~, and ..  Updated FileChecker.exe

When considering a migration to OneDrive for Business you should be aware of the specific File and Folder considerations and restrictions.  While some considerations exist that are explicit to OneDrive for Business and SharePoint; others are derivatives of the underlying client and/or server file system.  For example, on Microsoft Windows the following characters cannot be used in paths or files:

Files

<
>
|
♠♫
§
:
*
?
/

Paths

<
>
|
♠♫
§
:
*
?
/

NOTE

The above represents an array returned by the Path.GetInvalidFileNameChars and Path.GetInvalidPathChars methods respectively.  These methods; however, do not return a complete set of characters invalid in file and path names as they can differ depending on the underlying file system.  On Windows-based desktop platforms, invalid path characters might include ASCII/Unicode characters 1 through 31, as well as quote (“), less than (<), greater than (>), pipe (|), backspace (b), null () and tab (t) in addition to those in the example above.

File and Folders preceded with (_).

Files and Folders whose name is preceded with the (_) are considered ‘hidden’.  This limitation is derived from the Win32FileAttributes in the WebDAV protocol.  In scenarios where a File and/or Folder are preceded with (_), such as _Documents or _document.docx, in both cases the File and/or Folder will be visible in the OneDrive for Business Sync Client as well as the Web UI; however, when using Explorer View in the Web UI, Files and Folders preceded with (_) will not be visible.  Explorer View in OneDrive for Business uses the WebDAV protocol.  WebDAV refers to Web Distributed Authoring and Versioning, an extension of the HTTP protocol that is used to enable management of documents stored on WWW servers.  The scenario herein is based on limitations implied in FrontPage 2000 (see also http://support.microsoft.com/kb/219193).

In OneDrive for Business Explorer View can be instantiated by selected the Open with Explorer option in the Ribbon.

Picture1

When you use Open with Explorer, it opens Windows Explorer on your computer, but it displays the folder structure on the server computer that underlies the site.  You can manipulate the files in the folder, such as copying, renaming, deleting, etc.

Customers who have deployed OneDrive for Business on-premises can nullify the Win32FileAttributes using Windows PowerShell or C# as illustrated in the samples below:

Windows PowerShell

For IT Professionals you can use Windows PowerShell to remove the vti_winfileattribs folder metadata as shown in the example below.

$Folder = (Get-SPWeb http://contoso.sharepoint.com).Folders[“<DocLib_Name>”].SubFolders[“<_Folder_Name>”]

$Folder.Properties[“vti_winfileattribs”]=””

C#

Developers can use the SPFolder.Properties property to enumerate the hash table that contains the metadata for folders and implement the DeleteProperty method to deletes the element with the vti_winfileattribs key from the metadata for the folder.  See also http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spfolder.deleteproperty(v=office.15).aspx for an explanation and examples of using the SPFolder.DeleteProperty method.

WebDAV Resources

WebDAV API Functions [http://msdn.microsoft.com/en-us/library/windows/desktop/dd408161(v=vs.85).aspx]

[MS-WDV]: Web Distributed Authoring and Versioning (WebDAV) Protocol: Client Extensions [http://msdn.microsoft.com/en-us/library/cc250046.aspx]

[MS-WDVSE]: Web Distributed Authoring and Versioning (WebDAV) Protocol: Server Extensions [http://msdn.microsoft.com/en-us/library/cc250200.aspx]

Files and Folders preceded or followed with (.).

A number of restrictions with File and Folder naming convention are derivative of the the File System, developers who use the Windows APIs for file and device I/O in many cases, understand the various rules, conventions, and limitations of names for files and directories.

Files and Folders whose name is preceded or followed with the (.) character cannot be stored or synchronized with the OneDrive for Business.  All file systems follow the same general naming conventions for an individual file: a base file name and an optional extension, separated by a period.   The assumption in this case is (.) separates the base file name from the extension in the name of a directory or file.

Restricted Characters in File and Folder Names

Beyond those limitations documented above, users can create Files and Folders using any character including Unicode characters and characters in the extended character set (128–255), except for the following reserved characters:

  • < (less than)
  • > (greater than)
  • : (colon)
  • ” (double quote)
  • / (forward slash)
  • (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk)

These limitations are applicable to Microsoft Windows.

In addition you cannot use the:

  • ~ (Tilde)
  • # (Number Sign)
  • % (Percent)
  • [ ] (Braces)
  • { } (Angle Brackets)
  • ? (Question Mark)
  • You cannot use the period character consecutively in the middle of a folder name.  In the Windows File System, two consecutive periods (..) are used as a directory component in a path to represent the parent of the current directory, for example “..temp.txt”.

These limitations are applicable to OneDrive for Business and SharePoint 2013.  For additional information see also http://support.microsoft.com/kb/905231.

Other Considerations

SharePoint 2013 and OneDrive for Business do not provide support for POSIX semantics, that is a Folder “Foo” and “foo” are considered the same, as opposed to differing paths.

Validating File and Folder Names

Developers can validate File and Folder names using a number of methods.  The sample code at http://tinyurl.com/opcjfor uses Regular Expressions to deterministically identify illegal characters in a File name.

Syntax

FileChecker.exe -d C:Temp

Screenshots

Source Directory

image

Filechecker.exe

image

Output

image

Standard
Administration, SharePoint

Service Pack for SharePoint Server 2013 1 Recalled [Updated]

Service Pack 1 update is now available.  Refer to the information below to acquire the updated Service Pack for your product:

NOTE For a list of previously published KB’s refer to the recall information in the original post below.

Product

KB

SharePoint Foundation

http://support.microsoft.com/kb/2880551

SharePoint Server

http://support.microsoft.com/kb/2880552

Project Server

http://support.microsoft.com/kb/2880553

SharePoint Server Language Pack

http://support.microsoft.com/kb/2880554

SharePoint Foundation Language Pack

http://support.microsoft.com/kb/2880555

Office Web Apps Server

http://support.microsoft.com/kb/2880558

Customers with Service Pack 1 Deployed

For customers who have previously deployed Service Pack 1, download the updated Service Pack 1 and install over the existing Service Pack 1 running PSConfig or PSConfigUI immediately following.

Customers without Service Pack 1

For customers without Service Pack 1 deployed, download the updated Service Pack 1 package and deploy as per the KB documentation.

MSDN ISO

There is no update to the integrated ISO on MSDN as it was not affected by the issue.

A potential issue with the following Service Pack 1 packages may prevent customers with Service Pack 1 from deploying future Public and/or Cumulative Updates.  As a precautionary measure we have deactivated the download page until a new package is published.

Product

KB

SharePoint Foundation

http://support.microsoft.com/kb/2817439

SharePoint Server

http://support.microsoft.com/kb/2817429

Project Server

http://support.microsoft.com/kb/2817434

SharePoint Server Language Pack

http://support.microsoft.com/kb/2817438

SharePoint Foundation Language Pack

http://support.microsoft.com/kb/2817442

Office Web Apps Server

http://support.microsoft.com/kb/2817431

Customers with Service Pack 1 Deployed

For customers who have deployed Service Pack 1 there is no action; however, an update will be released to resolve a potential issue when deploying subsequent Public and Cumulative updates.

Customers with Service Pack 1 Downloaded

For customers who have downloaded Service Pack 1, but have not deployed Service Pack 1, we recommend you postpone deployment until an updated package is delivered (date is TBD).

MSDN ISO

The integrated ISO with SP1 on MSDN is not affected by this issue.  Service Pack 1 on MSDN is a full build release.

Standard
Administration, SharePoint

SharePoint Server 2013 Trial Image in Windows Azure China Platform Gallery

The SharePoint Server 2013 Trial image is now available in the Windows Azure China Platform Gallery.  The image is based on the current Windows Server 2012 Datacenter release and includes a complete installation of SharePoint Server 2013 Enterprise Trial patched with the March Public Update.

NOTE

Additional configuration is required to use the SharePoint Server 2013 Trial image include 1) a database server running SQL Server 2008 R2 or SQL Server 2012 2) a server running AD DS.

The current SharePoint Server 2013 Trial image will expire on September 22, 2014 unless activated using the appropriate product key.  See also http://technet.microsoft.com/en-us/library/cc263204(v=office.14).aspx.

Resources

SharePoint Deployment on Windows Azure Virtual Machines
http://www.microsoft.com/en-us/download/details.aspx?id=34598

SharePoint 2013 on Windows Azure Infrastructure
http://msdn.microsoft.com/en-us/library/windowsazure/dn275958.aspx

Installing SharePoint 2013 on Windows Azure Infrastructure Services
http://msdn.microsoft.com/en-us/library/windowsazure/dn275959.aspx

Automate Windows Azure SharePoint Deployments
https://github.com/WindowsAzure/azure-sdk-tools-samples/wiki/Automated-Deployment-of-SharePoint-2013-with-Windows-Azure-PowerShell

SharePoint and Windows Azure Development Kit
http://www.microsoft.com/en-us/download/details.aspx?id=24398

Standard
Hybrid, SharePoint

Outbound Hybrid Infrastructure Configuration Made Easy for SharePoint Server 2013 and Office 365

 

Over the past several weeks since we’ve released Service Pack 1 for SharePoint Server 2013 I’ve configured several PoC and demo environments with OneDrive for Business redirection to Office 365 with an outbound hybrid search topology.  Over the course of configuring these environments I found it to be easier to programmatically configure the more complex aspect (outbound infrastructure) and hopefully will be able to share the solution soon…

The solution I put together is a Windows Form (makes it easy to redistribute and iterate upon), simplifies the configuration and scripting of outbound infrastructure (example below).

The root domain is populated at runtime based on the machine (should be a WFE) from where the application is run.

image

The application next gets a list of all SPWebApplications on the local SPFarm, creates a list, and populates a combobox.

image

The application then takes the Personal Information Exchange (.pfx) certificate to be used for the STS and converts it to Base64 Encoded (.cer).

image

The application then creates the Windows PowerShell script necessary to configure the outbound infrastructure for hybrid search.

////TODO Add Syntax Highlighting.

image

The next step is the Configure tab which executes the script created in the previous steps and configures the outbound infrastructure.

Looking forward to sharing the solution soon, but any feedback is appreciated.

Standard