Home Blog

    How to Connect to PnP with MFA Enabled


    Today has been one of those frustraing days, because of course everything you think you know changes when you’re working in the cloud.

    So in a previous life and previous contract I was working on, the way we would connect to PnP was with the following code

    Connect-PnPOnline –Url -UseWebLogin

    Of course this worked fine for some time and then it no longer worked

    I would get various errors which would lead me down the path of checking Trusted Sites to see if the browser on the server was blocking the federation server or address, which led me to the Office 365 Whitelist URLS for Firewalls and Trusted Sites article by Chris Blackburn kindly linking to the more frequently updated Office 365 URLs and IP address ranges, maintained by Microsoft themselves.

    But alas, still no dice, then a chap i’m working with (who was invaluable during this whole process, thanks Charl) recalled a switch he had used previously which solved the problem

    Connect-PnPOnline –Url -SPOManagementShell

    You can read more about this on Erwin van Hunens blog Pnp PowerShell and Multi-factor authentication, where he documents the changes that happened back in March 2018.

    The official full connect code looks like this;

    Connect-PnPOnline -PnPO365ManagementShell <SwitchParameter> -Url <String>
        [-ReturnConnection <SwitchParameter>] [-LaunchBrowser <SwitchParameter>]

    Oh my, what a day it has been trying to solve this problem, this is the beauty and the beast of Office 365, constant changes and updates mean that even straight forward things can sometimes frustrate the hell out of us.

    Again thanks to Charl, Erwin and of course the PnP team, as whilst it’s annoying when things change, change is necessary.

    Matthew Hughes

    How to Dictate in Office 365


    I’ve often wondered about how to speed up the creation of content and so I often look for little hacks that the world presents to me, so imagine my surprise when I open word and I was presented with a way to dictate to the Office application.

    Now don’t get me wrong, dictation has been around for a long time but I also know that Microsoft have invested heavily in their intelligent services, using Microsoft AI and Azure AI to power these functions, in fact when you enable it, it tells you “hey in order to use Intelligent Services we’re going to send some stuff to and from Azure, ya dig?”.

    Of course I can get behind that when it’s so damn useful.

    Here’s a Facebook Live I did about the subject.

    Looking for more info about it? Check out Microsofts official support page below.

    That’s it for now, if you’re looking for more fun in Office 365 for your SME business, visit the YouTube channel subscribe and hit the notification bell.

    Matthew Hughes

    High Quality Office 365 Icons


    Are you looking for High Quality Office 365 Icons for the Office 365 Applications?

    Here are SVG scaleable Icons for each application, don’t worry the text below is a caption and not embedded on the image.

    However, don’t jump to the downloads just yet, why not check out the most elaborate video ever released for a set of icons, which at the time of publishing, has an amazing 750,000 views on YouTube. Who knew Icons were such big news?

    Office 365 Icons in PNG Format

    I’d love to re-invent the wheel but Matt Wade posted about this back in December and I am just expanding on his good work (PNG versions from Matt Wade)

    I may create some higher quality versions but between the SVG and PNG you’re pretty much good to go.

    If you do find this post useful and you do indeed download the icons, please leave a comment on this post.


    Matthew Hughes

    Learn Microsoft 365 Fundamentals for FREE


    On LinkedIn today I spotted a post by Guy Gregory an old friend of mine who used to run the Office 365 UK User Group with me in London.

    So I headed over and completed the course as I was instructed to and I was pleasently surprised by the content, up to date, full of great information and perfect if you’re trying to educate your first line support teams of an overview of what Microsoft 365 has to offer.

    Head over to the site here and start your learning path.

    I have to say the Gamification setup with the XP you earn is typical Xbox style gamification and great for Geeks like me.

    Microsoft Teams Gets a Major Update


    Today, whilst browsing twitter, I spotted an awesome update to Microsoft Teams that I thought was sharing, whilst they announced some cool stuff like different backgrounds during teams meetings, the most exciting thing for me was real time captions, how cool is that?

    Here’s an excert from the post, follow the link below for the full update.

    “Microsoft Teams is improving workplace collaboration by helping organizations move from an array of disparate apps to a single, secure hub that brings together what teams need, including chat, meetings, and calling, all with native integration to the Office 365 apps. Users can customize and extend their experience with third-party apps, processes, and devices, giving them the tools they need to get work done”

    Original Post

    The Ultimate Guide to SharePoint Hub Sites


    This page will be actively updated as I learn more about it – Last updated May 4th, 2018.

    In this guide to SharePoint Hub sites we’re going to take you through the process of enabling them on your tenant and then making use of the connected hub sites, in an Intranet style format giving your flat, disconnected Site Collection structure, a new lease of interconnected modern site delightfulness.

    However, before we begin, we should probably answer a few questions and explain why there is a need for SharePoint Hub Sites

    With the invent of Office 365 Groups, Microsoft Teams and of course the new modern interface (Modern Communication and Modern Team Sites) we are now in a position where users are empowered to create a silo of content loosely connected via the applications (Outlook / Teams) that surround them, SharePoint was originally built to bridge this gap between silo’d content but it feels like we are doing a bit of a u-turn largely thanks to the fact that we have this team / project based view of the world.

    Teams offers a view of your Group data
    Outlook offers a view of your Group data
    Groups in the browser offers a traditional SharePoint view of your Group data

    They are essentially disconnected.

    Enter – SharePoint Hub Sites.

    With SharePoint Hub sites, you can essentially promote any Site Collection based on the modern SharePoint Framework, into a SharePoint Hub Site.
    You can then associate these disconnected entities (Office 365 Groups) into a logical structure, with shared theming, navigation and search, rolling up news items at the same time.

    Whilst it feels like an Intranet of old, the sites that are connected work as they always did with the minor changes above, from a user perspective this is great because there’s no real change, however, from an organisational perspective we can now advertise a central location or Hub Site providing the user with structure and hierarchy, which sounds like a oxymoron when I describe no change but then big change, you see functionally the Office 365 Groups work in the same way they are just now connected.

    Should your hierarchy change in the organisation, no worries, simply disassociate the Office 365 Group with a Hub Site and associate it with it’s new structure.

    So what does this all look like in practice?

    Take a look at the screenshot below, here you can see three main sections

    1. Shared Navigation – Similar to the Office 365 Suite Bar but available on the Hub Site and its associated member sites, this provides a sensible and persistent navigation that is easily configured.

    2. Shared Search – This allows you to search across the Hub and its member sites, the immediate flyout provides you with instant search which is awesome.

    3. Rolled up News – Again this is a cross site news rollup, in the example below you can see we have news from the Intranet (SharePoint Communications Site), Kinetal Media (Office 365 Group Team Site) and Kinetal IT (Office 365 Group Team Site).

    4. Themeing – The theme applied to the site is currently applied across the Hub Site and all member sites, if I try to change it at member site level, a nice message is presented to me informing me that the site is managed at Hub level.

    At this time of writing SharePoint Hub Sites are currently rolling out, in fact for most people you will need to be part of the First Release Selected Users with a permission level of SharePoint Administrator or Global Administrator in order to enable the features and register new SharePoint Hub Sites.

    How to enable SharePoint Hub Sites

    (Promote Site Collections to Hub Sites)

    Connect to SharePoint Online using the SharePoint Online Management Shell or using SharePoint Online PnP

    # Connect to SharePoint Online Admin Centre
    # Registers a SharePoint Site Collection as a SharePoint Hub Site
    Register-SPOHubSite URL


    # Connect to SharePoint Online Admin Centre
    Connect-SPOService -Url
    # Register Site Collection as a SharePoint Hub Site
    Register-PnPHubSite -Site

    Once you have enabled a Site Collection as a hub site, you will then need to associate a SharePoint Site / Office 365 Group to that Site Collection.

    Connecting or Associating a SharePoint Site Collection to a SharePoint Hub Site

    # Connect to SharePoint Online Admin Centre
    # Connects a SharePoint Site Collection to a SharePoint Hub Site
    Add-SPOHubSiteAssociation `


    # Connect to SharePoint Online Admin Centre
    Connect-SPOService -Url
    # Connect SharePoint Site Collection to SharePoint Hub Site
    Connect-PnPHubSite -Site ` 

    Microsoft Reference for Add-SPOHubSiteAssociation

    This list was compiled by Jenkins over on his blog post about SharePoint Hub Sites

    1. You can create a Classic SharePoint Site as Hub Site with Limitations. Yes with Limitations (News and content rollup will not support)
    2. You can associate hub site for any site collection or Subsite. If you associate Subsite as Hub Site, the good news is the parent site doesn’t have to be a part of the hub site.
    3. You can convert existing Sites to Hub Sites.
    4. Create and Manage SharePoint Hub Sites
      1. Using PowerShell
      2. Using REST API
      3. Using CSOM
    5. You won’t be able to associate a SharePoint hub site to another hub site
    6. You can’t associate more than one SharePoint Hub Site
    7. Microsoft recommend selecting a communication site, or a team site that uses the new template. If you use a classic team site, the hub site navigation will only appear on modern pages, including document libraries, lists, and site contents. Hub site settings will only appear on modern pages.
    8. You can create up to 50 hub sites for an organization
    9. If you set up SharePoint Multi-Geo for your organization, only sites within the same geo location can be associated with a hub site
    10. No limit to associated hub sites.
    11. When users associate their sites with a hub site, it doesn’t impact the permissions of either the hub site or the associated sites. It’s important to make sure all users you allow to associate sites to the hub site have permission to the hub site.
    12. Implementing Security trimming for Hub Site Navigation refer here
    13. While removing hub site association from the site, theme will not restore automatically. You need to change manually.
    14. You can create root site collection as Hub Site refer here
    15. While creating site, looking for automatically associate hub sit, click here to know step by step implementation…
    16. Getting all your Hub Site content using Search API

    In order to create this blog post, I had to get inspiration from a whole bunch of places, in the resources below I list everything that was of some use.

    What is a SharePoint Hub Site – Microsoft Support

    Create a Hub site in SharePoint Online – Microsoft Support

    Setting up your SharePoint Hub Site – Microsoft Support

    Associate a SharePoint Site with a Hub Site – Microsoft Support

    Office 365 Hub Sites are Here a Few Tips – Marc Anderson

    Create SharePoint Hub Site using PowerShell

    SharePoint Patterns & Practices PowerShell Overview – Microsoft

    Getting Started with the SharePoint Online Management Shell