I have to prepare report about OneDrive Usage, where I collect information about ItemCount. I have to do it for over 3000 Users.
Problem: PnPOnline requires connection to every Site Collection separately (not like SPOService - to tenant). Because of big amount of Sites, that I have to check, I don't want to login separately by every User. To avoid it, I wanted to use App with specific permissions. Currently my app has following access:
I can connect with the ClientID and ClientSecret to the Site (there is no error).
When I try to run a simply script >GetPnPList< I get following error:
Get-PnPList : Exception has been thrown by the target of an invocation.
At line:1 char:1
+ CategoryInfo : WriteError: (:) [Get-PnPList], TargetInvocationException
+ FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Lists.GetList
As far as I found out - it is caused by missing permissions.
Question: Which permissions are missing by the app?