New support for # and % in SharePoint Online and OneDrive for Business



As William Shakespeare wrote in Romeo and Juliet “What's in a name? That which we call a rose by any other name would smell as sweet.”


Files are as unique as the people who create them and we’re constantly working in SharePoint Online and OneDrive for Business to support a broad array of types and naming conventions.


In the upcoming weeks, we’ll be shipping support for # and % as supported characters in file and folder names across document libraries in SharePoint Online and OneDrive for Business.  This will allow people to create, store, and sync files containing # and % characters whether those characters are used as a prefix or suffix to the file or folder name.  # and % will be limited to use in file names in addition to SharePoint Online and OneDrive for Business document libraries and related folders.  The use of # and % outside of document libraries is not supported at this time.




Getting Started with # and %

# and % support is not enabled by default in your Office 365 Tenant and will be gradually introduced over the next several weeks.  You can immediately opt in to this release starting today using the Windows PowerShell cmdlet provided later in this post.


For new Office 365 Tenants, in June 2017, support for # and % will enabled by default when the Tenant is provisioned.  If you would like to opt out of # and % support for your Office 365 Tenant using the Windows PowerShell cmdlet provided later in this post you must do so by September 2017.


All existing Office 365 Tenants that have not opted into # and % support by H2 2017 will have # and % support enabled by default.

Enabling # and % Support (Tenant Administrators)

To enable # and % support using SharePoint Online PowerShell commands, you must be a SharePoint Online global administrator.  There will be no initial administrator web-based user experience (e.g. SharePoint Online and/or OneDrive for Business admin centers).


Before you can run SharePoint Online commands, you must install the SharePoint Online Management Shell module and connect to the SharePoint Online service. For more information, see Connect to SharePoint Online PowerShell.


These commands require version 16.0.6323.1200 of the SharePoint Online Management Shell or greater.  To download the latest version of the SharePoint Online Management Shell visit https://www.microsoft.com/en-us/download/details.aspx?id=35588.


NOTE Prior to enabling support for # and % in your Office 365 Tenant, ensure any 3rd party solutions you are using have been updated to supported the new APIs necessary to support this change.  For information on updated APIs for # and % support see also https://dev.office.com/blogs/upcoming-changes-to-sharepoint-and-onedrive-for-business-apis-to-suppor....  It may take up to one hour for the setting to propogate once run.













Allows # and % characters in file and folder names in SharePoint Online and OneDrive for Business document libraries.



Disallows the # and % characters in file and folder names in SharePoint Online and OneDrive for Business document libraries.



# and % support will be enabled by Microsoft on your Office 365 Tenant when available. NoPreference state is the default state before we enable # and % on behalf of Office 365 Tenants following the schedule mentioned previously. In this state, # and % are turned off and tenant admins can run Set command to switch it to either Allowed or Disallowed. Once it is set by tenant admins, we will not change the setting when we enable on # and % on behalf of Office 365 Tenants. In addition, this is a read-only state, so it can not be set by running the Set command.

Frequently Asked Questions

Q:  Is support for # % enabled by default in my Office 365 Tenant?

A:  No.  Support for # % must be enabled by the Tenant Administrator, unless your tenant is created after the June timeframe, as noted above.


Q:  As a developer are there any API changes I need to be aware of?

A:  Yes.  For developer documentation and updates refer to https://dev.office.com/blogs/upcoming-changes-to-sharepoint-and-onedrive-for-business-apis-to-suppor....


Q:  At what levels of the system is this support being added?

A:  Files and folders with SharePoint Online and OneDrive for Business document libraries will now be able to support # and % in their file name.  While SharePoint lists and libraries can have # and % in their URLs, there are no plans to enable their use through the SharePoint user interface at this time.  In addition SharePoint sites (Web objects) and site collections (Site objects) can not have # and ; in their URL.


Q:  Can I search for files containing # and % in the name(s)?

A:  Yes; however, # and % are escaped characters therefore cannot be used independently in the composition of a query.  I.e.  “where contains ‘#’”.


Q:  When will the rollout of # and % support be completed?

A:  Rollout will commence in June 2017 for new Office 365 Tenants and H2 CY2017 for existing Office 365 Tenants.  Scheduled completing depends on a number of factors and will be updated throughout the rollout.


Q:  Does the Groove sync client support # and %.

A:  No.  Support is limited to the new OneDrive for Business sync client.  To determine which sync client is best for your scenario or which sync client you are using see also https://blogs.technet.microsoft.com/wbaer/2017/03/23/which-onedrive-for-business-sync-client-is-righ....

Occasional Visitor

How about other special characters - like the trademark or copyright symbol?

Regular Visitor

Enabled the special character feature on our tenant using Sharepoint Online Management Shell cmdlet. The feature does not seem to be working, even though Get-SPOTenant shows the option is set to allowed. Maybe I am being impatient and it takes time to apply the feature after the command is run to enable?? We do have the latest OneDrive for Business client installed as well, so that is not the issue.


***Update 4/18/17***


After several days, the feature is now working. This is such a welcomed change...something we have waited a long time for. 


The rollout is in progress and will take some time to be available to all Office 365 Tenants.  The Allow param will ensure your Tenant is opted-in for the experience during the rollout.

Regular Visitor



Is there a plan to enable this to consumer Office 365 / OneDrive users?


Thank you.

New Contributor

Good stuff Bill!  This is removal of a deployment blocker for file migrations.


The SpecialCharactersStateInFileFolderNames property doesn't apear for my two Australia East based tenants.  I take it that the property will get rolled out over time and then some time after that the enforcing of the property will happen?

Senior Member

Checked multiple tenants this morning and no such property is yet available... Is there some timing that you can share regarding availability in the US?


Please make sure you are using the latest SharePoint Online Management Shell, version 16.0.6323.1200. You can download it here: https://www.microsoft.com/en-us/download/details.aspx?id=35588. Please note you will need to uninstall your existing version, and then install the latest.

Senior Member

Updating to the latest SharePoint Management Shell did the trick...  Thanks!  Would be nice if this application were delivered via UWP!  


  1. Ran the following script successfully:

    $userCredential = Get-Credential -UserName "<globaladmin@domain.com>" -Message "Type the password."Connect-SPOService -Url https://<domain>-admin.sharepoint.com -Credential $userCredentialSet-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed
  2. Created file named "##%%badfile.txt" in OneDrive synched directory and received imediate notice of bad file name (cannot sync file)
  3. Exited Onedrive (personal and business - new single client)
  4. Started OneDrive desktop app (again)
  5. Reports "Can't upload files", shows ##%%badfile.txt in view sync problems list due to bad file name...

Is there some period of time before feature is enabled?  Get-SPOTenant shows "Allowed"...

Respected Contributor

Awesome, been waiting for this. If we enabled this, does anyone with an older groove client just stop working all together or they just won't support the new characters? 

Occasional Contributor

 @Ed, over the next several weeks. All we did today is opt in to get it sooner rather than later.

Senior Member

The feature did start working for me after a few hours in each tenant... Fantastic to have this old issue behind us!!!

Occasional Visitor

How do I do this using a Mac?  There doesn't seem to be a SharePoint Online Management Shell for Mac clients.

Regular Contributor

 Great news! This will ease the current migration we are performing from on premises file shares to OD4B!

Occasional Visitor

This worked great.  Took a couple hours for ODFB to recognize.  Updated dozens of tenants using this format.

$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://tenantnameinsharepointURL-admin.sharepoint.com
Set-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed


Hello Mark

I tried same script with my credentials. I am able to login and connect without any issue, but in last line I am getting following error, Am I missing anythig

Set-SPOTenant : A parameter cannot be found that matches parameter name 'SpecialCharactersStateInFileFolderNames'.

At C:\Scripts\AllowSpecialCharacters.ps1:5 char:15

+ Set-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidArgument: (:) [Set-SPOTenant], ParameterBindingException

+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Online.SharePoint.PowerShell.SetTenant




Senior Member

See Paul Hasket's comment above.... Essentially, you need to make sure you are running the latest version of the SharePoint Online Management Shell.


Thanks Ed for pointout. It works and assuming this will take some time to update on tenant.



Senior Member



Just backed up 75 Gb of data into our shared SharePoint Team sites, this update is a freaking life saver!


Updating to the newer version of the SPOnline PowerShell module fixed things for me.  Noticed that I had TWO previous versions installed - deinstalled them both.

Can this be enabled without being an admin?

Senior Member

Have a look at the FAQ above Mathew... Either Administrator can enable now or you can wait until sometime H2 for the update to be applied by MSFT automatically.

Occasional Visitor

Hi all, just successfully got this command to run, quick guide if anyone is stuck:


Firstly, if you have any versions of SharePoint Online Management Shell installed, uninstall now and quickly reboot.



1) https://www.microsoft.com/en-gb/download/details.aspx?id=35588 - New SPOnline Management Shell

2) https://github.com/officedev/pnp-powershell/releases - Handy Module!


Run SPOnline Management Shell as Admin and then run:


Import-Module Microsft.Online.SharePoint.Powershell -DisableNameChecking

Set-ExecutionPolicy RemoteSigned (if this is already set you may receive and error message, don't worry and continue)


Install-Module SharePointPnPPowershellOnline -AllowClobber (allow all)


#credentials (copy and paste all 3 lines and run together)



$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."


#connect to SPO (copy one line at a time and run, replace "company" with your tenancy name)

Connect-SPOService -Url https://company-admin.sharepoint.com -Credential $userCredential

Connect-SPOnline -Url https://company.sharepoint.com -Credential $userCredential


#set special characters (select all and run)

Set-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed


#test special characters setting

Get-SPOTenant | Format-List SpecialCharactersStateInFileFolderNames


This can take several hours/days apparently to propagate, let me know if you get stuck :)



Jamie H

Technical Analyst

New Contributor

1. You wrote:

Q:  Does the Groove sync client support # and %.

A:  No.  Support is limited to the new OneDrive for Business sync client

After a year of confusion I thougt I finally understood that the "OneDrive for Business sync client" is GROOVE.EXE, that terrible unstable and buggy piece of software, and that the "the NEW OneDrive sync client" is onedrive.exe that comes nowhere near Dropbox, but is much better than GROOVE.EXE. Now here comes a Microsoft official and talks about "the NEW OneDrive for Business sync client". The confusion is back again :( Will onedrive.exe support these characters? From which build nr.? 


2. Another Microsoft official, Jason Moore, is referring to this article as an answer to the uservoice.com request Enable long file path for OneDrive for Business. "Boom, it's done". ???? I cannot find anything about long file paths in this article.



The Groove.exe based OneDrive for Business client does not support the use of # and %.  This support is limited to the newer sync client (OneDrive.exe)-based which replaces the previous client for use with Office 365.  The new client is often referred to as the NextGen Sync Client.  You can download the latest version of OneDrive.exe at https://onedrive.live.com/about/en-us/download/. 


As documented here last month we announced support for # and % across SharePoint and OneDrive and now in addition to adding support for # and % we're also increasing MAXPATH or otherwise SharePoint and OneDrive's Url path length restrictions from 256 Unicode code units to 400.  This new limit section applies to the total length of the URL path to a folder or a file in SharePoint Online and/or OneDrive for Business but not to the length of any parameters. Also, these limitations apply only to un-encoded URLs, not to encoded URLs. There is no limit to encoded URLs in SharePoint Online and OneDrive for Business.


For additional information on SharePoint Url composition, refer to the details below:


The total length of a SharePoint URL equals the length of the folder or file path, including the protocol and server name and the folder or file name, plus any parameters that are included as part of the URL. The formula is as follows:


URL = protocol + server name + folder or file path + folder or file name+ parameters





Frequent Visitor

Bill is there a schedule for the MAXPath to show up in SharePoint/Onedrive?  If we have to wait is there a Powershell script that can be run to manually implement like we did the # and %?


If you're using MFA for Admin accounts, the commands are: (with new SP management shell)


Connect-SPOService -Url https://tenantname-admin.sharepoint.com
Set-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed


It will then prompt for credentials and MFA value.


Frequent Visitor

Lou understood, we have run the special character Powershell.  My questions are: Is the 400 character limit in effect or when will it go into effect?  If it will be awhile into the future, is there a Powershell script that can be be run to invoke the 400 character limit?  


Mark, The increased file path limit support is rolling out now.  That means it should hit tenants within next ~60-90 days.

https://products.office.com/en-us/business/office-365-roadmap and filter on OneDrive.

Frequent Contributor

@Bill Baer, our use-case is completely the other way around.


We want to stop users from uploading documents with special characters. We are sick and tired of all kinds of weird filenames uploaded to our SharePoint libraries. Filenames that are a hundred miles long punctuated with all kinds of characters!!


Is there a way to block all/selected special characters instead of allowing?

Regular Visitor

I am not tech savy and when I downloaded the sharepoint program and entered the command above, it gave me an error. Is there another way to do this or am I just doing it incorrectly? My goal is to have file names in my onedrive for business with Hashtags.


@Anthony Khoshabe - what error are you seeing?

Regular Visitor

I am hosted by godaddy, i am trying to log on using this tag:


$adminUPN="<the full email address of a SharePoint Online global administrator account, example: jdoe@contosotoycompany.onmicrosoft.com>"
$orgName="<name of your Office 365 organization, example: contosotoycompany>"
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential

After entering all necessary info, i receive this error:

Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind : The term
'Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind' 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 again.
At line:1 char:1
+ Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Onlin...SpoSitePipeBind:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

@Anthony Khoshabe - try the following...

  1. Open the SharePoint Online Management Shell
  2. Enter "Get-Module"
  3. if the version that comes back is less than 16.0.6323.1200, download the newest version at https://www.microsoft.com/en-us/download/details.aspx?id=35588
  4. Once you have installed/upgraded it, enter "Connect-SPOService -Url https://tenantname-admin.sharepoint.com" where tenantname is your tenant and enter your admin credentials
  5. Enter "Set-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed"
  6. Wait a few hours and you should be good to go.  To test, try uploading a file named something like "Store #40.docx"
Regular Visitor

@Lou Mickley

What exactly is the "tenant name". I am using office 365 through godaddy? Does that have anything to do with the tenant name?


@Anthony Khoshabe - If you click on OneDrive icon, after it loads, look at the URL.  It will be https://tenantname-my.sharepoint.com - that will show you your tenant name.


I've managed to run the command : 

>>>>  Set-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed

without errors, but when I check the status with: 

>>>>  Get-SPOTenant | Format-List SpecialCharactersStateInFileFolderNames

I get the following: 


SpecialCharactersStateInFileFolderNames : NoPreference


Any ideas ?   Bill 

EDIT >>>>

OK - I didn't give it enough time - it's saying allowed now 


So I've run the command & set  SpecialCharactersStateInFileFolderNames to "Allowed" 


Rebooted my machine which is running onedrive client, linked to my onedrive for business account,

but I'm still getting error messages.  e.g.   

"Visual C#"  "The name or type isn't allowed"


Any ideas what I should do now? 


Regular Visitor

@Lou Mickley this worked perfectly! Thank you for explaining it clearly. 


I have implemented this sucessfully now, 

but I am still having issues with folders such as _vti_cnf

I understand that this is a known issue 


Is it on the roadmap to be fixed ? 

Occasional Visitor

I am unable to get this to support # in an extension. I'm still getting the unapproved filename issue.


Example: filename.b#3


Any help would be fantastic as this is a massive hurdle for our development environment.

Frequent Visitor

Use this Powershell script:

$orgName="xxxx" - This is the name of Sharepoint URL (only use the xxxx part inside the parentheses - https://xxxx.sharepoint.com
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://xxxx-admin.sharepoint.com -credential $SharePointAdmin
Set-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed


Get-SPOTenant (Use this command to verify Special Characters are allowed after you run the script)