[BUG] #2399
Unanswered
SquirrelAssassin
asked this question in
General
[BUG]
#2399
Replies: 1 comment
-
Moving this to discussion forum. Looks like an issue with your code and not the PnP PowerShell module itself. One suggestion here, you can also try using Check the link here: https://pnp.github.io/powershell/cmdlets/Add-PnPListItemAttachment.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the below code in an azure automation runbook. The appId/secret has full control on spo tenant. The issue is the second attachment always fails to upload with the weird error.
Expected behavior
attachments should get uploaded
Actual behavior
I get the below error
FileName :
FileNameAsPath :
ServerRelativePath :
ServerRelativeUrl :
Context : PnP.Framework.PnPClientContext
Tag :
Path : Microsoft.SharePoint.Client.ObjectPathMethod
ObjectVersion :
ServerObjectIsNull : False
TypedObject : Microsoft.SharePoint.Client.Attachment
.Invoke-PnPQuery : User cannot be found.
.At line:105 char:9
.+ Invoke-PnPQuery
.+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. + CategoryInfo : NotSpecified: (:) [Invoke-PnPQuery], ServerException
. + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,PnP.PowerShell.Commands.Base.InvokeQuery**
FileName :
FileNameAsPath :
ServerRelativePath :
ServerRelativeUrl :
Context : PnP.Framework.PnPClientContext
Tag :
Path : Microsoft.SharePoint.Client.ObjectPathMethod
ObjectVersion :
ServerObjectIsNull : False
TypedObject : Microsoft.SharePoint.Client.Attachment
Steps to reproduce behavior
Feed the above code to Azure runbook and test it with an SPO modern site.
Other symptoms
If I run the snippet on my laptop, it works just fine. Also, other pnp cmdlets work just fine with that appId/secret on runbook.
Which version of the PnP-PowerShell Cmdlets are you using?
PnP PowerShell for SharePoint Online
What is the version of the Cmdlet module you are running?
1.11.0 PnP.PowerShell
How did you install the PnP-PowerShell Cmdlets?
Through the "modules gallery" of Azure automation account
Beta Was this translation helpful? Give feedback.
All reactions