Get-PnPFile: user cannot be found

%3CLINGO-SUB%20id%3D%22lingo-sub-1149580%22%20slang%3D%22en-US%22%3EGet-PnPFile%3A%20user%20cannot%20be%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1149580%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22body%22%3E%3CP%3EWhen%20I%20attempt%20to%20download%20a%20file%20from%20a%20sharepoint%20online%20site%20using%20Get-PnPFile%20in%20an%20azure%20automation%20powershell%20runbook%2C%20I%20get%20the%20error%20%22User%20cannot%20be%20found%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20running%20locally%2C%20the%20file%20is%20downloaded%20without%20any%20problems.%20Any%20idea%20what%20causes%20this%20in%20the%20runbook%20environment%3F%20AUthentication%20does%20not%20seem%20to%20be%20the%20issue%2C%20I%20can%20connect%20without%20any%20problems.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20installed%20the%20latest%20module%20of%20the%20PnP%20framework%20in%20the%20runbook%3C%2FP%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1149580%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

When I attempt to download a file from a sharepoint online site using Get-PnPFile in an azure automation powershell runbook, I get the error "User cannot be found".

 

When running locally, the file is downloaded without any problems. Any idea what causes this in the runbook environment? AUthentication does not seem to be the issue, I can connect without any problems.

 

I have installed the latest module of the PnP framework in the runbook

0 Replies