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
Apologies if I've put this in the wrong place. I'm seeing a problem calling set-pnpsearchsettings.
Short(er) version:
if I connect to a Modern Team site in my Dev M365 tenant as a user that has no permissions on a site collection at all, when I call set-pnpsearchsettings first time through it reports an error (as expected) and on subsequent calls it appears to succeed (which is not expected) and get-pnpsearchsettings says the property has changed (which is should not have) but it has failed silently (if I issue a search in that site it is still on DefaultScope, and if I connect away from the site and back to it, get-pnpsearchsettings have reverted to defaultscope).
Long version:
I was experimenting with different permissions levels to call set-pnpsearchsettings against my dev tenant and found that for an unprivileged user it behaves incorrectly, first time error, subsequent times no error but silent failure.
On my Dev M365 tenant using the default user MeganB who does not have access to the Teams site collection I created, when I go to the site I get the usual You Need Permission error page (below)
But when I use MeganB user in Powershell to connect to the test site and issue the set-pnpsearchsettings command, it behaves incorrectly, first time failure, subsequent times no error (silently failing).
Couple of things
it shouldn't appear to work and silently fail on subsequent calls, if there's a permissions issue you'd expect it to be the same every time
it should not report that the property has been changed (which should not have been possible), but when you connect away and back again it shows the default (which is what it was supposed to show)
It does the same thing under PS5/PnP1.12 and PS7/PnP2.12
When I was testing this in my Dev M365 tenant it's on a Windows 11 laptop.
This discussion was converted from issue #4511 on November 05, 2024 10:50.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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
-
Edited to remove incorrect information
Apologies if I've put this in the wrong place. I'm seeing a problem calling set-pnpsearchsettings.
Short(er) version:
Long version:
I was experimenting with different permissions levels to call set-pnpsearchsettings against my dev tenant and found that for an unprivileged user it behaves incorrectly, first time error, subsequent times no error but silent failure.
On my Dev M365 tenant using the default user MeganB who does not have access to the Teams site collection I created, when I go to the site I get the usual You Need Permission error page (below)
But when I use MeganB user in Powershell to connect to the test site and issue the set-pnpsearchsettings command, it behaves incorrectly, first time failure, subsequent times no error (silently failing).
Couple of things
It does the same thing under PS5/PnP1.12 and PS7/PnP2.12
When I was testing this in my Dev M365 tenant it's on a Windows 11 laptop.
Beta Was this translation helpful? Give feedback.
All reactions