Change the SharePoint 2013 Suite Bar Text


Hacking around with PowerShell always finds some new property or method that I would never have gone looking for! This time it is a SPWebApplication property that sets the text in the "Suite Bar".

The default text in the suite bar is "SharePoint" for on premises installs and "Office 365" plus an icon for the cloud versions. The actual HTML for the text is "<div class="ms-core-brandingText">SharePoint</div>".

Examples from on premises SharePoint and Office 365:


… but… I don't know how to get access to the SPWebApplication object in Office 365 from PowerShell! You can still change it using JavaScript. (See notes at the end of this article.)


Using PowerShell

The following PowerShell will list the Suite Bar text for each of your web applications:

PS C:\> Get-SPWebApplication | Select DisplayName, SuiteBarBrandingElementHtml

DisplayName               SuiteBarBrandingElementHtml
-----------               ---------------------------
My Sites - 82             <div class="ms-core-brandingText">SharePoint</div>
SharePoint Intranet - 80  <div class="ms-core-brandingText">SharePoint</div>
SharePoint Testing - 81   <div class="ms-core-brandingText">SharePoint</div>

To change the text, access your web application object (mine will be the 2nd in the list, so [1]), and set the SuiteBarBrandingElementHtml to your new text. You will probably want to include the default CSS class for consistency. Remember to do the .Update, or nothing will be saved!

PS C:\> (Get-SPWebApplication)[1].suitebarbrandingelementhtml = 
"MA<span style='color:#FF2020'>X</span> Technical Training" PS C:\> (Get-SPWebApplication)[1].update()

The above will change the text to:

If I include the DIV and class from the default text then is will look like this:


Can't use PowerShell?

You can use JavaScript or jQuery to change the Suite Bar title text in both on premises SharePoint and Office 365. All you need is some code to find the DIV with the class of ms-core-brandingText and change it's contents. When working with Office 365, be aware that the text is also a hyperlink to https://portal.microsoftonline.com/, so be careful not to break it!

In jQuery it might look like this:

$('.ms-core-brandingText').text('Your New Title Text');

Here's an article about changing the text in Office 365: http://sharepoint-community.net/profiles/blogs/changing-the-office-365-main-link-text


Have fun and don't break anything!



Anonymous said...

Did you find a way to use "Get-SPWebApplication" with O365?
I try to change and read the timeout value.

Mike Smith said...

You won't be able to change anything at the web application level in O365, using either Sandbox Solutions or PowerShell. The web application is "owned" by Microsoft/O365 (the hosting service). Our first touch point is the Site Collection.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.