This post was most recently updated on January 27th, 2019.
This post is about delving into some legacy stuff – Microsoft has still kept SOAP-based SharePoint Web Services included in the product, since a lot of functionality has been built on top of them. We encountered an issue where you suddenly started getting exceptions for Unauthorized Access (-2147024891, System.UnauthorizedAccessException), no matter if you had access to the list or not.
We started getting this error, when requesting list items using SharePoint SOAP Web Services (namely, Lists.asmx):
<m:code>-2147024891, System.UnauthorizedAccessException</m:code> <m:message xml:lang="en-US"> Access denied. You do not have permission to perform this action or access this resource. </m:message>
This error gets thrown at you even if your user account has Global Admin permissions.
Haha, yes, yes it is. SharePoint Web Services is built on SOAP.
While you probably shouldn’t build anything new using these services, there’s bound to be a lot of legacy stuff that uses them.
Can’t deny it, though – my first thought was, that now it finally happened: Microsoft just shut down the service it deprecated already in 2013(?). But it actually only happened on one tenant, so I guess that wasn’t the case after all :)
But what was it, then?
Okay, this is basically magic. It’s a bit weird, but the resolution here is the same as in this case:
Surprising, but the underlying error is apparently the same. So enabling “Legacy Auth Protocols” fixes the issue for the SOAP Web Service authentication.
So, in short – the PowerShell commandlets below should help you out:
Connect-SPOService Set-SPOTenant -LegacyAuthProtocolsEnabled $True
Then wait 24 hours and try again :)
Latest posts by Antti K. Koskela (see all)
- Fixing “An assembly specified in the application dependencies manifest [projectname].deps.json was not found” - February 13, 2019
- What is “fp.js” – and why is it snooping on your SharePoint usage? - February 6, 2019
- Google Plus is shutting down – fix your .NET OAuth flow! - February 4, 2019
- Solving yet another “Microsoft.SharePoint.Client.ServerException: Unknown Error” - January 29, 2019