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

Popular posts from this blog

Export / Import from Excel file in SharePoint

SharePoint Web Part - Export or Import from Excel Here is the tool which will help you to import excel file into a list. This tool will not create any kind of list or column. It will help users to import their excel file in specific list. This tool also allows users to update existing records directly from excel file. I have develop the tool in SharePoint Framework. Currently this tool is for SharePoint Online version only. We are supporting following columns : Single line of text Multiple lines of text Number Yes/No Person or Group (Person + Group) Person or Group (Person + Group) (Allow multiple selections) Date and Time Choice Choice (Allow multiple selections) Hyperlink or Picture Currency Managed Metadata Managed Metadata (Allow multiple values) Lookup Lookup (Allow multiple values) Installation of App :- 1. Click here to download the sps-import-from-excel.sppkg . 2. Visit the Microsoft 365 SharePoint Admin Center 3. Go to Apps -> App Catalog. If you don't have ap

Deploy SPFx production solution files in specific folder with in container on Azure CDN

Hi, When we creates SPFx solution and deploying the build files on Azure CDN, it deploys all the files in a container which you mentioned in "deploy-azure-storage.json" file. This is bit messy to see. Because you can deploy multiple solution on the same container. But what if you want to manage solutions by Solutions or By versions. Here is the way. I will show you how to deploy SPFx production deployment files in a specific folder in the Container on Azure CDN. First you have to deploy some gulp task packages in dev-dependencies npm install gulp-util gulp-deploy-azure-cdn --save-dev Now you need to make following changes in the "gulpfile.js" file : const deployCdn = require('gulp-deploy-azure-cdn'); const gutil = require('gulp-util'); gulp.task('deploy-azure-storage-folder', function () {   return gulp.src('temp/deploy/**/*', {}).pipe(deployCdn({       containerName: '<<Your Container Name>>', // Container

Error while compiling spfx project - Error - typescript - node_modules/@fluentui/react-focus/node_modules

 Some when you create new project or upgrade existing project, developer get issues related to fluent ui packages i.e. : Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,26): error TS1005: ';' expected. Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,41): error TS1005: ')' expected. Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,42): error TS1005: ';' expected. Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,72): error TS1005: ';' expected. Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,107): error TS1005: '(' expected. Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/De