[BUG] New-PnPUPABulkImportJob not working after registering pnp.powershell as new app for tenant #4269
Unanswered
Id10tSupport
asked this question in
General
Replies: 1 comment 10 replies
-
You also need to give SharePoint > Sites.FullControl or Sites.Manage permissions as it creates a file in SharePoint site. Check the docs for that here: https://pnp.github.io/powershell/cmdlets/New-PnPUPABulkImportJob.html Am moving it to a discussion, as it is a configuration issue and not a cmdlet issue. |
Beta Was this translation helpful? Give feedback.
10 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.
-
We recently created the new app registration for PnP.PowerShell in our tenant and now New-PnPUPABulkImportJob is no longer working. It was working prior to the deprecation of the multi-tenant app registration.
Example of script used:
$FileURL = "https://xxxxxx.sharepoint.com/sites/search/Bio/res2024_09_10.json"
#Update About Me for accounts in JSON file
$propertyMap = New-Object -type 'System.Collections.Generic.Dictionary[String,String]'
$propertyMap.Add("EmpID","EID")
$propertyMap.Add("About Me","AboutMe")
$propertyMap.Add("Quick Dial","QuickDial")
$propertyMap.Add("Assistant Name","AssistantName")
$propertyMap.Add("Assistant Phone","AssistantPhone")
$propertyMap.Add("AssistantEmail","AssistantEmail")
$propertyMap.Add("BusinessUnit","BusinessUnit")
$propertyMap.Add("Floor","Floor")
$propertyMap.Add("CellPhone","CellPhone")
New-PnPUPABulkImportJob -Url $FileURL -IdType PrincipalName -IdProperty "OperatingSystemID" -UserProfilePropertyMapping $propertyMap
Response received
New-PnPUPABulkImportJob : Access Denied: This application does not have the required permissions to access profile information.
I have verified that the app does have User.ReadWrite.All access granted in SharePointOnline for User's Profiles as well as Microsoft Graph for User's Profiles
What is the version of the Cmdlet module you are running?
PSVersion 5.1.14409.2001
PnP.PowerShell 1.12.4
Which operating system/environment are you running PnP PowerShell on?
Windows Server 2012 R2
It should be noted that I get the same error response on a Windows 2022 Server using PSVersion 7.4.4 and PnP.PowerShell 2.1.1
Beta Was this translation helpful? Give feedback.
All reactions