Forum Discussion
How to Export SharePoint list with over 5000 records to excel
@kalpeshvaghela Seems this needs an administrator account to run, I am the creator of the list and the site on SharePoint but it asks for an admin account.
Is there a way to overcome this issue?
As this script is using PnP.PowerShell, it will require one time consent which can be done by Global Admin User Only.
See Authentication steps here.
If it's not possible for you then you need to convert this script to only CSOM PowerShell
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community
- michael1900Jan 12, 2023Copper Contributor
kalpeshvaghela Hi Sir , I try to copy ur code and modify and run in powershell but got below error :
Do you mind to help me to change the code , i really need it .
my site URL : https://danny520.sharepoint.com/sites/teamssites
List Name: https://danny520.sharepoint.com/sites/teamssites/Lists/list3/AllItems.aspx
Really appreciated for your help.