Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > How to Disable the Flow button in SharePoint Online
September 19
How to Disable the Flow button in SharePoint Online

Now, now, I know what you’re thinking, “This is a terrible idea! Why would any want to disable Flow?? What’s Flow ever done to them anyway?” I’m right there with you, honest I am, but a customer asked me how to do this and I can’t imagine they’re the only ones trying to do it. So while I’m a big fan of Flow and think everyone should enjoy it, in the unlikely event your organization doesn’t want to, here’s how to disable it.

When things are in their default state, the Ribbon, or Toolbar in a Modern List or Document Library in Office 365 shows an easy to use link to wire up a Flow to the library. It looks like this:


Very cute, very innocent, but regardless, some folks don’t want it there. Even if the user hitting the list or library isn’t licensed to use Flow, it’s there. This is a per site collection setting, and nowhere in the site or site collection settings is there a place to shut it off. I turned on the Bat Signal, and PowerShell answered my call. Sort of…

The official Microsoft SharePoint Online cmdlets have a cmdlets, Set-SPOSite and it has a parameter, –DisableFlows. Are you thinking what I’m thinking? Of course you are. And it does what we want, kind of. Here’s how the whole solution looks:

Connect-SPOService -Url

$val = [Microsoft.Online.SharePoint.TenantAdministration.FlowsPolicy]::Disabled
Set-SPOSite -Identity -DisableFlows $val

You have to do the funny business with $val because the –DisableFlows parameter doesn’t accept a boolean, like a civilized parameter does, it requires its value to be in the form of a Microsoft.Online.SharePoint.TenantAdministration.FlowsPolicy object, whatever that is. So that’s what it gets.

Now when we go to our Document Library it looks like this:


Sad, I know. When you come to your senses and want to reenable Flow, here’s how you do it:

$val = [Microsoft.Online.SharePoint.TenantAdministration.FlowsPolicy]::NotDisabled
Set-SPOSite -Identity -DisableFlows $val

And now is all right in the world.

Unless you have the fancy Site Collections that are using Groups in the background. Then you get the “womp womp” sound from Set-SPOSite. Okay, it really says, “Set-SPOSite : is a Groups site collection.” but we all know what it really means. A less motivated man would have given up at this point. He would have taken this as a sign from the universe that one should not be disabling Flows, it’s just unnatural. Not this man. (In reality, not this man’s customer). So I went to Plan B, the PnP PowerShell, and it did not disappoint. The PnP’s version of the Set-Site cmdlet works with Group Site Collections and doesn’t require any weird casting voodoo. Here’s how it looks:

Connect-PnPOnline -Url -Credentials 'SteffenAdmin'

Set-PnPSite -DisableFlows:$true

Here’s how you right that wrong:

Set-PnPSite -DisableFlows:$false

That’s much easier, and works on all site collections.

There you have it. I hope you never have to use it. Smile

Edit: This does not work with Group connected sites.





the way flow is delivered ou of the box, it enables any user to automatically sync business data with his personal on-drive and email. this should be a major concern for most people , but i don't think they realize it.

flows should be disabled by default until someone configures the environment to prevent data loss!
 on 9/22/2018 10:55 AM

Wrong, This Doesn't Work!

Show the same error "..Group site collection" for Set-PnPSite -DisableFlows as well.
 on 3/29/2019 12:02 PM

It does work!

I does work.. But I had to make a change,

Set-SPOSite -Identity -DisableFlows

changed to

Set-SPOSite -Identity -DisableFlows $val
 on 4/1/2019 6:32 AM

Re: It does work!

I'm glad you got it working. So you're saying you couldn't set it for the site collection /sites/Me2Hub ? Have you tried the PnP cmdlet?

Todd O. KlindtNo presence information on 4/2/2019 1:54 AM

Only hide the button

Hi i wonder if i have flows on a list i want them to run but i only want to hide the flow button for users.

If i run Set-SPOSite -Identity -DisableFlows $val

Would this make my already create flows not to run on that specific site?
 on 9/6/2019 12:12 AM

Only hide for SharePoint group

Hi Todd, Do you know if i can only hide for the selected SharePoint group ? so i can at least run my flows on the list.
 on 10/24/2019 5:36 PM

Re: How to Disable the Flow button in SharePoint Online

I have install SharePoint Online Management Shell to execute given power shell commands.
Connect-PnPOnline –Url [Site URL]-admin –Credentials (Get-Credential)
I have run above command but after entering credentials, getting below error message:

Connect-PnPOnline : The term 'Connect-PnPOnline' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try

Please help me resolve this.
Thanks in advance.
 on 5/11/2020 5:56 AM

PnP does not work with site collections

Set-PnPSite does not work for me - I am still getting "url is a Group site collection" error

Any ideas?
 on 10/2/2020 4:19 AM

Re: PnP does not work with site collections

I just tested this and I got the same result. It looks like this does not work with Group connected sites. I tried with both the SPO and PnP modules. No dice with either.

Todd O. KlindtNo presence information on 10/6/2020 5:14 PM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.


Body *

Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person


Want a message when I reply to your comment? Put your Twitter handle here.