Cannot Add SharePoint item to list (Error 401) #825
Unanswered
dietcheesecake
asked this question in
Q&A
Replies: 1 comment
-
@dietcheesecake : what permissions did you grant to the Azure AD app you're using? If you've not specifying an app in your setup, you're defaulted to the PnP Management Shell app. That one however needs to be consented in your Azure AD environment before you can use it. See https://pnp.github.io/pnpcore/using-the-sdk/configuring%20authentication.html for our authentication documentation. See https://pnp.github.io/powershell/articles/authentication.html#setting-up-access for using the PnP PowerShell management app. |
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
-
Hi,
I have an issue that I cannot add item to SharePoint list. Can anyone help me on this issue? Please see my code below...
I get an Exception
Message: SharePoint Rest service exception.
Error.Message: 401 UNAUTHORIZED
I tried with all add methods (pnpList.Items.AddAsync, pnpList.Items.AddBatchAsync, pnpListItems.Add). They all give the same error.
For more information
** I can create list and update list item, but NOT add new item.
** I login as Site Collection Administrator.
Thank you,
Chris L,
Beta Was this translation helpful? Give feedback.
All reactions