I had a requirement to create a provider hosted app with App-Only Principals which needs to be hosted on the SharePoint Online tenant.

It was created successfully & working fine in my older tenant. 

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


We need to run the following powershell command to get this error fixed:

Set-SPOTenant -DisableCustomAppAuthentication $false

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

If you like this post, please share this with your friends and comment

Happy SharePointing!!!