You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code running fine on my developer tenant but stuck in production tenant.
$rootConn = Connect-PnPOnline -Url $rootUrl -ClientId $ClientId -CertificatePath $certPath -CertificatePassword $CertPass -Tenant $tenant -ReturnConnection
#$smList = Get-PnPList -Identity "ECG-Sites-Master" -Connection $appConn
# 1 for Tenant, 2 for Hub, 3 for Site, 0 for default behavior
$web.SearchScope = 1
$web.Update()
Invoke-PnPQuery
Clear-Host
Write-Host $web.SearchScope #Shows 'Tenant'
$SearchQuery = 'LastModifiedTime=today AND ContentType:"DPCDocuments"' # Stuck here in production
#Run Search Query
$SearchResults = Submit-PnPSearchQuery -Query $SearchQuery -All
Write-Host "Found: $($SearchResults.ResultRows) files" #Never get here in production
I also tried to connect as myself with $rootConn = Connect-PnPOnline -Url $rootUrl -Interactive with same results.
our production tenant uses Multi Factor Authentication developer tenant does not but I have many script using certificate that work fine in both tenant.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following code running fine on my developer tenant but stuck in production tenant.
I also tried to connect as myself with
$rootConn = Connect-PnPOnline -Url $rootUrl -Interactive
with same results.our production tenant uses Multi Factor Authentication developer tenant does not but I have many script using certificate that work fine in both tenant.
Any idea?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions