Skip to main content

SharePoint Provider Hosted App throwing 401 Unauthorized on newly created Office 365 tenants

I was working on some new tenant with the clients. There we had some requirement to create new SharePoint Provider Hosted App with App-Only principals. It was created successfully & working fine in my older tenant. 

After testing of it, I deployed on newly created tenant where it has started showing issues :



I have registered a support ticket to Microsoft SharePoint team . They tried to support with lots of meetings & collected logs but they have not given the solution.

After did lots of research , I found the solution from Microsoft Q & A site. Lots of SharePoint experts are facing same issue. They have mentioned some workaround as well.

They are asking to run a command :

Set-SPOTenant -DisableCustomAppAuthentication $false

After running this command, every thing has started working. 

Just one thing, You have to use latest SharePoint Online Management Shell.


Comments