Eric Skaggs - Home

Dec 10
Remove those extra users from Azure AD and Office 365

When working with the Azure AD Sync Services Tool (a.k.a. DirSync)​, you'll often end up with user accounts synced up to Azure AD that you don't need and will never license.  This typically happens during the initial sync (full sync) as subsequent syncs are deltas.  In any case, here's a quick PowerShell script you can run against Azure AD that removes only those users that are synchronized with on-premises AD and are unlicensed:  https://github.com/skaggej/powershell/blob/master/PS_Azure_AD_Remove_Synchronized_Unlicensed_Users.ps1.

It's pretty self-explanatory, but feel free to leave comments/questions.

Dec 03
SharePoint 2013 - Hide Recent from Left Navigation

​This has already been written about, but I couldn't find a good step-by-step guide that had all the pieces clearly laid out.  So, that's the goal of this post.

The "Recent" section in the left navigation of SharePoint 2013 is incredibly annoying.  In my opinion, it's something that should be off by default, but we should have a way to enable it as desired through the user interface.  Unfortunately, it's on by default and if we want to turn it off, we can't.  It's not possible.

SP2013_HideRecent1.jpg

As an alternative, we can hide it with jQuery and CSS.  Follow the steps below for success.

1.       Download jQuery from http://jquery.com/download/.  In my case, I ended up with version 2.1.1.
2.       Figure out where to store jQuery in your SharePoint site collection.  I don’t recommend using a content delivery network (CDN) or any URL that’s in another domain due to trust issues.  In my case, I created a document library in the site called “js” in which I plan to store any and all JavaScript files.  I did this in the top-level site to ensure that jQuery is easily referenced from anywhere within my site collection.
SP2013_HideRecent2.jpg
3.       Now that jQuery is available within your site collection, you can hide that pesky “Recent” section on one page or on all pages following the methods below.

Hide “Recent” section on one page

1.       Edit the page
2.       Add a Content Editor Web Part to the page
3.       Paste this code into the Content Editor Web Part, making any changes you need to.
<script src="/js/jquery-2.1.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("span[title='Recent']").parent().hide();
});
</script>
4.       Save/Check In/Publish the page and you’re done.

Hide “Recent” section on all pages

This assumes that all pages in your site collection are referencing the same master page.  Of course if you have multiple master pages and site collections, you’ll need to do this for each master page being used within each site collection.
1.       Edit the master page of your site in SharePoint Designer 2013 (other methods work fine as well).
2.       Add a reference to jQuery in the HTML <head></head> section of your master page.
<!-- jQuery addition -->
<SharePoint:ScriptLink language="javascript" name="~sitecollection/js/jquery-2.1.1.min.js" runat="server" OnDemand="false" LoadAfterUI="True" />
3.       Add the jQuery script to hide the “Recent” section within the “PlaceHolderAdditionalPageHead” content placeholder.
<script type="text/javascript">
$(document).ready(function() {
$("span[title='Recent']").parent().hide();
});
            </script>
SP2013_HideRecent3.jpg
4.       Save/Check In/Publish the master pages and you’re done.

The Result

View your site again and you shouldn’t see that annoying “Recent” section in the left navigation anymore!
SP2013_HideRecent4.jpg

Nov 26
Office 365 Video YamJam

If you'd like to get the scoop on some of the features, functions, limitations, and considerations for Office 365 Video, then check out this YamJam:  https://www.yammer.com/itpronetwork/uploaded_files/27257276.

If you're not a member of the IT Pro Network on Yammer, you should be able to request an invitation.  There's really a lot of good content here that should add some clarity around Office 365 Video.

Long story short, it's new and will continue to change quite a bit.  To submit your own changes, you can go to the UserVoice site for Office 365 Video here:  https://office365video.uservoice.com/forums/273864-general.

Nov 23
SharePoint Saturday Phoenix 2014 - Recap

I had a great time at SharePoint Saturday Phoenix yesterday.  My session went very well and there was a good turnout.  If you're interested in obtaining the content from my presentation, you can access it via OneDrive at http://1drv.ms/1x7lHiR.

Thanks to everyone who came out.  ASU is a great venue and we look forward to seeing all your smiling faces again next year!

Nov 19
SharePoint Online PowerShell Connect-SPOService Error

I've had a lot of trouble recently with connecting my PC to my SharePoint Online tenants via PowerShell.  The process is fairly simple and this article is the best starting point:  http://technet.microsoft.com/en-us/library/fp161388(v=office.15).aspx.

Having done all the right things, I was running into the following error upon every time I'd run the Connect-SPOService cmdlet:  "​The Application ID (AppID) for which the service ticket is requested does not exist on the system."

Connect_SPOService_Error_AppID_2014-11-16_8-49-45.png

I don't know what that means or where to begin with it, so I hit the web and found nothing useful.  Ugh.

Well, today I got lucky.  I'm presenting at tonight's meeting of the Phoenix Office 365 User Group and have been spending a few precious lunchtime minutes prepping for tonight.  In particular, the facility we meet in does not provide wired network access and so I want to make sure that my virtual machines work are going to play nicely with my wireless NIC today.  I disabled my Ethernet NIC and am only on wireless now as I write this.

Somehow, that fixed the issue.  I'm guessing it has something to do with my host (Windows 8.1) running Hyper-V and having several different virtual switches that share my wired Ethernet NIC.

I'm now essentially not using any unusual network settings and I've been able to connect to multiple tenants now without a problem.  Yay!

Nov 17
SharePoint Saturday Phoenix 2014

I'm speaking at SharePoint Saturday in Phoenix in just a few short days.  We're at ASU!  I'm excited to check it out as I've never been over there.  My wife and I packed up our lives and moved out to Phoenix in May, so there are several things we need to do yet.  In any case, to register and see details for the event, visit the SPSEvents site here:  http://www.spsevents.org/city/phoenix/phoenix2014.

My session will be covering PowerShell for Office 365, which is a topic that's becoming more and more relevant in SharePoint projects as companies migrate all or part of their sites to SharePoint Online.  It's interesting to see an Office 365 session at a SharePoint​ Saturday, but that's the way things are moving.  It's not enough to know SharePoint on-prem anymore.  You need to know it online, too.  Since it's one feature of Office 365, you end up being better at what you do if you know a thing or two about Office 365 management.

If you specialize in SharePoint, it's likely that you'll eventually run into something in SharePoint Online.  Having the skills to support the tool is necessary and I wouldn't be surprised if we start to see more Office 365 topics at SharePoint Saturdays.  Supporting this, consider the yearly SharePoint Conference being merged with others to form the Microsoft Ignite conference.  We've just gone from 3-4 days in one technology to a full five days spanning several...most of which are currently in Office 365...and I'd be willing to bet the rest move that direction as well.

I hope to see you there!

Nov 05
SharePoint 2013 Displaying People Search Results in Multiple Columns

​​I recently had a need to take the normal people search results in SharePoint Online and make them look better.  In particular, use all that white space to the right of the default search results listing.  Forgive the photos below.  I wanted to keep the large resolution to demonstrate the functionality here.

Default People Search Results

SP2013_PeopleSearch_Default_2014-11-05_14-38-44.png

CSS

Drop this CSS in a Content Editor Web Part on the page.

<style type="text/css">
.ms-srch-people-outerContainer {
 min-height: 200px;
 margin: 0 0 0 -10px;
 padding-bottom: 10px;
 padding-left: 10px;
 float: left;
 clear: none;
}
</style>

Updated People Search Results

SP2013_PeopleSearch_Columns_2014-11-05_14-38-44.png

The result gives me what feels like a responsive design.  As I narrow my browser's width, the search results adjust accordingly and even maintain their order.

Nov 03
SP2013 Geolocation Manager

Adding a Geolocation column to a list in SharePoint 2013 is a bit of a pain because there’s no built-in user interface to do so.  Instead, you have to add it with code.  Check out Tobias Zimmergren’s article to get acquainted with the Geolocation column in SharePoint 2013:  http://zimmergren.net/technical/sp-2013-getting-started-with-the-new-geolocation-field-in-sharepoint-2013.

Now, to the point of my post, I’ve just launched a project on CodePlex to provide a UI for Geolocation management in SharePoint 2013.  Ideally this will work in both on-premises and online environments.
 
As this is a new effort, it’s currently in beta and needs a lot of work to be truly awesome.  That said, check out the project here:  http://sp2013geolocationmanager.codeplex.com/.  I appreciate any and all feedback.  You can reach me at eric.skaggs@catapultsystems.com or eskaggs@outlook.com.
Aug 30
PHXO365UG - Next Meeting - 09/17/2014
The first meeting of the Phoenix Office 365 User Group was a huge success!  I was hoping for 5 or so people to show up, given that it was the first meeting, but we ended up with a total of 9 attendees!  Thanks again to those of you that were able to make it and for those of you that couldn't, I have great news.
 
Our next meeting will be on Wednesday, September 17th from 5:30pm to 7:30pm at TEKsystems here in Phoenix.  Registration and everything else you need to know is available on the group's Meetup site.  In this session, Rob Riley will demo the Office 365 products at a high-level as to familiarize what products and features are included in Office 365.  He will touch briefly on Office 365 licensing and how the license choice refers to the features available to the user.
 
I’m excited about unifying the Office 365 community in Phoenix!
 
Have input?  Reach out to me directly:  eric.skaggs@catapultsystems.com
 
Follow the group on Twitter:  Phoenix Office 365 User Group
 
Join the group on Meetup:  Phoenix Office 365 User Group
 
Visit the group's responsive Office 365 site on your favorite device:  https://phxo365ug-public.sharepoint.com/
Aug 11
SharePoint 2013 – Link Display Template for Search Results

Scenario

It's odd, but SharePoint handles links in search results differently than you might expect. To clarify, I'm talking about those items that have a content type of "Link," meaning they're typically in a Links list a SharePoint site. By default, links will be displayed in search results just fine, but when you click on one, you're taken to the display form of the link within the Links list instead of the actual destination of the link.

Expectation

Most of the customers I've worked with would much rather click on the link and go directly to the link, instead of having to first go to the display form, then click on the link again to finally get to it. Of course, I agree with that and that's the purpose of this post. Let's walk through how to create a custom display template specifically for "Link" items in a SharePoint 2013 environment.

Solution

Overview of solution steps

  1. Create a Links List
  2. Create a Managed Property and Start a Full Crawl
  3. Create a Display Template
  4. Create a Result Type
  5. Test Your Search Results

Create a Links List

This is necessary to ensure that you have some content to crawl in the next step. You need to have at least one links list with at least one link in it to continue. If you already meet this requirement, you can skip to the next section, "Create a New Managed Property." Follow the steps below to create a new links list.

  1. Navigate to a SharePoint site of your choice.
  2. From the gear menu in the upper-right of the page, click "Add an app."

  3. Select the Links app, give it a name, and click Create.
  4. Add a couple of links to the list. It's a good idea to give them different names and URLs so that you can easily differentiate between them while testing. Also, it's nice if they're working links, so be sure to use working URLs.

Create a New Managed Property and Start a Full Crawl

The crawled property that contains the actual URL of a link is ows_URL. This crawled property is already mapped to an existing managed property called OWS_URL. However, if you attempt to reference OWS_URL in your display template, you'll only get "undefined" as a return value because the OWS_URL managed property is not marked as "Retrievable" in the search schema within Central Administration. When I tried to edit the OWS_URL managed property and mark it as retrievable, I received a message stating: "The settings could not be saved because of an internal error: The managed property "OWS_URL" has an invalid name: The following invalid characters were used: '_'."

Welcome to SharePoint. This is a built-in managed property with an underscore in the name, yet SharePoint won't allow you to update it through the GUI because it has an underscore in the name. Confused? Me too. Don't waste any more time on this and move on to create your own managed property.

I decided to create my own managed property to avoid tampering with the built-in one since SharePoint typically doesn't like it when you change anything that's there by default. I created a new managed property called owsURL, mapped the ows_URL crawled property to it, and then ran a full crawl. Running a full crawl is necessary for the change to take effect. Follow the steps below to create the new managed property and start a full crawl.

  1. Navigate to your Search Service Application within Central Administration.
  2. In the left navigation, click "Search Schema."

  3. Click "New Managed Property."

  4. Fill out the form as shown in the list below. If not specified, there's no need to change the field.
    1. Property name: owsURL
    2. Retrievable: Yes – check this box
    3. Safe: Yes – check this box
    4. Mappings to crawled properties: ows_URL
    5. Click OK
  5. In the left navigation, click "Content Sources."

  6. Now we'll start a full crawl on the content source. Starting a full crawl can put a load on your server(s) and cause a degradation in SharePoint's responsiveness. It's advisable to perform this step after hours when users are not interacting with the system. Hover over the "Local SharePoint sites" content source, open its drop-down menu, and then click "Start Full Crawl." (I'm assuming this is the correct content source. You'll want to start the full crawl on the content source that contains your newly created Links list).

  7. You'll get a prompt asking "Are you sure you want to start a Full Crawl?" If you're comfortable with the potential performance impact to your users, then click OK.

Depending on how much content you have, the full crawl can take minutes or hours. While the crawl runs, you can move on to the next section and create the display template.

Create a Display Template

The display template controls how the search result looks and behaves. Follow the steps below to create a new display template.

  1. Navigate to the top-level site of your SharePoint site collection that contains your links list.
  2. From the gear menu in the upper-right of the page, click "Site settings."

  3. Under "Web Designer Galleries," click "Master pages and page layouts."

  4. Click on the "Display Templates" folder.
  5. Click on the Search folder.
  6. Download Item_Default.html. Leave your browser open as you'll come back to it.
  7. It's not recommended to change Item_Default.html itself because it's a default file included with SharePoint. Instead, rename your local copy of Item_Default.html to Item_Link.html and customize that going forward. This is the recommended name only because it matches the naming convention used by the other display templates. If you want to make this stand out as a customization, I recommend adding a prefix for your company name. For example, I might call mine Catapult_Item_Link.html or something similar. You can name it whatever you like.
  8. Open Item_Link.html in your favorite text editor.
  9. Replace all content in Item_Link.html with the code in the file I've linked to below.

    Eric's copy of Item_Link.html on OneDrive

  10. Save Item_Link.html.
  11. Switch back to your browser and upload Item_Link.html to the Search Display Templates folder. You'll see it appear in the list there under Item_Excel_HoverPanel.html. You should also see Item_Link.js appear. This file is automatically generated by SharePoint and you never have to touch it, so don't. J

With that, you're done with the display template and ready to move on to the next section to create a result type.

Create a Result Type

Why is this necessary? Well, technically it's not, but I don't want my custom display template that I created specifically for links to be used for anything else because that would cause some confusion. The result type maps the type of search result to a particular display template. In this case, I want all search results that have a content type of "Link" to use my "Link Item" display template. Follow the steps below to create a result type.

  1. Navigate to the top-level site of your SharePoint site collection in which you'll be searching. This could be a stand-alone search site collection or a content site collection that has a search site within it. Either way, it's best to navigate to the top-level site.
  2. From the gear menu in the upper-right of the page, click "Site settings."
  3. Under the "Site Collection Administration" heading, click "Search Result Types."

  4. Click "New Result Type."
  5. Fill out the form as shown in the list below. If not specified, there's no need to change the field.
    1. Give it a name: Link
    2. Which source should results match?: "Local SharePoint Results"
    3. Open the "Show more conditions" section, and configure this section as shown below.
      1. ContentType
      2. "Equals any of…"
      3. Link

    4. Within the Actions section, open the "What should these results look like?" drop-down menu and choose "Link Item."

    5. Click Save
  6. You should be taken back to the "Manage Result Types" page where you can now see your newly created result type near the top under the "Defined for this site collection" heading.

With all that hard work done, you're ready to move on to the next step and Test Your Search Results.

Test Your Search Results

  1. Navigate to the search center.
  2. Enter a query that will return an item whose content type is Link. If you're having trouble finding any, you can search for "ContentType:Link" and you're guaranteed to get one if you have any.
  3. Verify that your search results are displaying the correct URLs visually as well as functionally. That is, you should both see the correct link and be taken to it when you click on a search result.

     

1 - 10Next
Pluralsight