Recently I had the displeasure of tackling an obscure issue; On a public facing, anonymous access enabled SharePoint 2013 website, some mobile devices were receiving an authentication prompt when the following REST API call was made against a Document Library.
Above is just a small snippet, but the dreaded authentication prompt would pop up when the call was made! The most confusing aspect of the situation was that only certain combos of browser + mobile OS would see the auth prompt. For example, Android + Chrome would see the prompt, yet Android + Firefox was fine.
I thought I was going crazy, then I remembered that this is SharePoint we’re dealing with. ANYTHING is possible! I started working through a small checklist of items:
- Anonymous access enabled in both Central Administration AND the Site Collection
- Mobile Browser View feature deactivated link here
- Document Library versioning settings OK
- No checked out or unapproved Documents in the Document Library
Well, that’s the usual suspects ruled out. All signs were now pointing to how SharePoint handled requests made from mobile devices.
Thankfully the internet is a thing! Another blog came to the rescue with a solution. Adding the following XML snippet to the web.config did the trick.
Credit to the following blog for providing the fix required – item #1: http://blogs.perficient.com/microsoft/2011/02/three-options-for-disabling-the-sharepoint-2010-mobile-redirection-system/