SharePoint Online Hub Site – Take Inventory Using PowerShell

I was playing around with SharePoint Online Hub Sites today and noticed something interesting…

You might be asking yourself what are Hub Sites?! Read all about them here: 

Note: As of 5/7/2018 Hub Sites are at 100% WW roll out to Office 365 per 

In my Office 365/SharePoint Online tenant I created 2 hub sites and associated a few brand new team sites to each hub. (Read more about creating hub sites here:

Navigation/branding was propagating to all sites in each hub, but I was curious on how to take an inventory of all these sites (which sites are associated to which hub). I dug open the SharePoint Online Management Shell and did a Get-Member against Get-SPOSite. There are 2 new values – IsHubSite and HubSiteId


(As of 5/8/2018) I cannot run a simple Get-SPOSite | Select Url, IsHubSite, HubSiteId (This may work down the road, but does not work at this time). It displays false for IsHubSite for each site and displays all zeros for each HubSiteId

Connecting to each SPOSite individually works through (You can also run Get-SPOHubSite to see only the Hub Sites in the tenant):

I came up with the following script to loop through all SharePoint Online Site Collections and display the URL, Whether or not it is a hub site, and what the hub site ID is. This could be expanded upon, but is something to get you started and get accurate counts of how many hub sites are in the tenant and how many/which child sites are associated with each hub:

Screenshot for proof:

Hope this helps!


Enumerating SharePoint Sites for Office 365 Groups With PowerShell

On 11/8/16 Microsoft made true of announcements from August 2016 and announced that Office 365 Groups with connected SharePoint Online team were now available. Link –

The SharePoint admin inside me began to think about managing all of these new site collections/cluttering up my SharePoint Admin Center! The good news (Spoiler Alert)…It doesn’t! One of my friends (Brian Kinsella – had the same question, so I decided to dig in to figure out how to get at all of these new site collections.

Most of you with an active Office 365/SharePoint Online deployment are probably familiar with the SharePoint Admin center:


I went ahead and created a new Office 365 Group called “TestO365Groups”

To do this I did the following:

  1. Go into the Mail App > (Under Groups) Clicked the + button
  2. Fill out the appropriate information (Name, Description, Privacy, etc.)
  3. This provisioned a site collection at following URL (I checked this by clicking the Files tab within the group) –

Now onto the concerns above!

I was not able to see this site collection in the SharePoint Admin page and I was not able access Office 365 Groups via SharePoint Online PowerShell cmdlets (Get-SPOSite)


Exchange PowerShell to the rescue! Here’s what you can do to find all those Office 365 group URL’s:

  1. Fire up Exchange Online PowerShell –
  2. Open PowerShell as Admin and connect to the O365 tenant using the following PowerShell:
Run the following command to get each Office 365 group and its associated SharePoint site URL:
Check it out (There’s a lot of properties you can work into this script if you’d like..109 to be exact):



SharePoint 2013/2016 Cloud Hybrid Search Service Application

I ran through the setup of the new SharePoint 2013/2016 Cloud Hybrid Search Service Application and wrote about it on the Skyline blog! Definitely an exciting new service and the best hybrid search experience to date..

SharePoint in Azure – SendGrid Configuration

Recently setup outbound SMTP in an Azure SharePoint farm. There is great documentation ( out there already, but figured I’d share my experiences with it.

Included in Azure is a cloud-based email service called SendGrid. You get 25,000 email credits free a month. Here’s the rest of the pricing:

Once this service is created in your environment (Click the first link to get the walkthrough) you will be assigned a username/password for SMTP relay. Make note of this since you’ll be using it later on.

After the SendGrid service is spun up you still need a way for SharePoint to use this. Pointing the outbound email configuration at will not work because SendGrid requires a username/password. Good thing SendGrid has some good documentation too:

After configuring the SMTP Server feature on the SharePoint server (You could use a separate server for relay, but this was dev so I was playing) I tested first with Telnet (Using the example in the SendGrid documentation) and then with PowerShell to verify everything was working in SharePoint.

The documentation is good so follow that, but I did run into 2 items that weren’t discussed:

  1. Add your domain as an alias domain in SMTP
  2. The IP Address of does not work
    • In SMTP > Right Click the SMTP Virtual Server # 1> Properties > Access > Relay Restrictions
    • Click the Relay button and note that is added (Per SendGrid instructions). This needs to be switched to the IP Address of the Azure server

Here’s the PowerShell example:



SharePoint/Azure ACS Token Signing Certificate. Will you please just sign my tokens?!

Setting up Azure ACS was fun. It’s so easy to get it up/running/connected to SharePoint and you have the instant satisfaction of using Microsoft/Google/Facebook accounts to login to SharePoint. Great success! Note: Microsoft only gives you the UPN claim..which is a unique ID so when users log in it looks gross. Google and Facebook are able to pull in a lot more claims..but Microsoft is more secure in that fashion I suppose.

Anyways there is great documentation out there already on how to get rocking and rolling. Here’s a few I’ve used:

Anyways there isn’t really much documentation out there on the Token Signing Certificate. Most of the documentation out there states to use a self-signed certificate for DEV and get a certificate from a Commercial Certificate Authority for PROD. Alrighty then. Here’s the screen in Azure


Not knowing too much in the ADFS token signing cert space (In the past most environments I have worked with use ADCS or PKI to generate these)  I took to the interwebs.

The reason I was researching is because if I were to put in a CSR for I wouldn’t get it or it would get revoked…I don’t own Companies like Comodo have a DCV (Domain Control Validation) questionnaire built right into the certificate purchasing process. For the self-signed cert you can use whatever you want.

I researched to see if Azure ACS could have a friendly name or DNS CName that we could pull the cert for. NOOPE!

I found a great tool by Steve Peschka that allows you to actually export the token signing certificate right out of ACS. The ACS tenant is actually already an HTTPS site so there is a preexisting cert. SWEEET! It works like a charm too..

This specific client had their heart set on using the commercial certificate authority so I kept trucking.

The certificate for ACS is described in detail here:

Alright I’m still not sure what subject name to use..until I found this forum post:

Frank Lesniak had the answer I was looking for (This was for ADFS, but still applied to ACS):

**I’m just copying his answer in here in case the forum post ever gets deleted

  1. The certificate’s key length should be at least 2048 bits.
  2. Validity period should be as long as possible (given cost), up to 5 years
  3. The signing algorithm should be either SHA-1 or SHA-256. If you need to support ADFS 1.x legacy federation, Windows 2000, Windows XP SP2, or Windows Server 2003, use SHA-1. Otherwise, for best security, use SHA-256. You may need to call your publically-trusted certificate issuer to validate the signing algorithm.
  4. Ensure that the private key is exportable
  5. Subject name does not matter… but something like would be a common implementation.
  6. Key usage does not matter.

The key points being #5 and #6 – ADFS does not care what you name the certificate or what kind of certificate is being used (i.e. code signing, server authentication, client authentication, etc.). My advice would be to generate a certificate however you’d normally feel comfortable doing so. For example, many of my clients use IIS to generate the certificate signing request (CSR), then submit the CSR to the commercial CA. Once you’ve loaded the certificate into the computer store, it should be available for AD FS to use.


In summary – It doesn’t matter! Use or if you’re already rocking a wildcard cert for everything use that. Any X.509 certificate will do…

Leaving a Yammer Network

I recently decided to leave my first Yammer network…I joined too many networks to keep up with so something had to give. It took me a while to find the “Leave Network” option so I figured I’d post it out there for you/me to reference in the future 🙂 Pretty simple stuff, but I couldn’t find a blog or article that was high in Bing search results

  1. Click the Ellipses (. . .)
  2. Click Edit Profile
  3. Click Networks
  4. Click Leave Network
  5. Wave Goodbye




Office 365/SharePoint Online – Getting Around the List View Threshold Error

I recently ran into a scenario where an Office 365 (SharePoint Online) list was over 10,000 items and I was attempting to delete the site, only to run into the dreaded List View Threshold Hold error. There are a lot of easy ways around this on premise to get rid of this site/list such as using PowerShell, changing the LVT for administrators, turning off LVT for this list, and many more creative/fun ideas. Office 365 doesn’t really have any of these options. The best way for handling this type of scenario that I’ve found is to use a little Access magic! Fire up Access and do the following:

1. Create a new Blank Desktop Database

2. Click External Data | More (Under Import & Link) | SharePoint List

3. Type the name of the SharePoint Online site you are connecting to and select Link to the data source by creating a linked table

4. clip_image002

5. Now sign in to your Office 365 tenant and click Next. Select the list(s) you want to link to and click OK

6. clip_image004

7. Open up the table containing the SharePoint list and create a query to run against it (Click Query Design | SQL View):

8. You will get a prompt indication that the query is running against data in linked tables. Click Yes

9. You will get another prompt indicating that you are able to delete X Number of rows in the specified table. Again, Click Yes

Now check the SharePoint site and notice that it is 10 rows lighter! Change the number in the SQL query to adjust how many items you want to delete at one time. The most I’ve deleted at once is 5000