In our Azure functions, we have powershell scripts that connect to SharePoint online and give monthly reports. Recently, we discovered that
connect-pnponline is fail to connect to SharePoint after upgrading to modern authentication in SharePoint.
When we allow access apps in the below image without modern authentication, this will work fine.
Is there any way to overcome this issue in Azure functions? When SharePoint is upgraded to modern authentication, how can you connect it with Azure functions? I've tried different PnP commands but no luck
Here is the error :
[Error] Connect-PnPOnline : Cannot contact web site 'https://mytenant.sharepoint.com/' or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'. The response headers are 'X-SharePointHealthScore=3, X-MSDAVEXT_Error=917656; Access+denied. The response status code is 'Unauthorized'. The response headers are 'X-SharePointHealthScore=1, X-MSDAVEXT_Error=917656;