powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG]

Open LeopoldLerch opened this issue 2 months ago • 2 comments

Reporting an Issue or Missing Feature

Issue

Expected behavior

Event Receivers are not only added, but are also firing

Actual behavior

When adding Remote Event Receivers via Add-PnpEventReceiver-Command, the Function is executed and the Receivers are obviously registered to the List. However, they do not fire. Formerly it was meant, that this is an issue due to MS uses internal stuff and more details, I do not want to go into now. It had to do with the fact, that the Registration was done while being authorized via token. It did work with the old "useWeblogin" method, because this was cookie based authentication.

However, "now" MS released an migration guide to move from ACS-based RERs to ones using EntraId app registrations (https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins-modernize/use-remote-event-receivers-without-azure-acs-dependency). I am able to register a EventReceiver, tough it is not fired. Maybe I missed something, maybe MS did not check, when writing this doc, if they are actually firing when registered it that way?

If there is now only token-based authentication in PnP.Powershell, either that commandlet should be able to produce actually firing RER´s, or it should be removed completely.

Steps to reproduce behavior

Register an Event receiver using the PNP-Commandlet "Add-PnPEventReceiver" and check if it actually is also triggered (and not only registered)

What is the version of the Cmdlet module you are running?

3.1

Which operating system/environment are you running PnP PowerShell on?

  • [ x] Windows
  • [ x] Linux
  • [ ] MacOS
  • [ ] Azure Cloud Shell
  • [ ] Azure Functions
  • [ ] Other : please specify

How I register the RER:

Image

Looking at an eventsink for received request triggered by the EventReceivers (LeoTestOld is an RER, registerd with the old SharepointPnpPowershell modules, which goes to the /old path, the one registered with the current version and entraId is supposed to end up in the "/sub" path, but it does not appear )

Image

Permissions of my AppRegistration:

Image

LeopoldLerch avatar Nov 06 '25 12:11 LeopoldLerch

Can you consider re-purposing and using WebHooks ??

Remote Event Receivers have been deprecated - and will stop working in April,2026 https://www.powercommunity.com/remote-event-receivers-retirement-update-in-sharepoint-online/

kachihro avatar Nov 25 '25 21:11 kachihro

Hi, thx for you response.

The whole purpose of this is to extend the availability of the RERs up to june 2027. Therefore a migration to entra app registration is needed, which, however, does not work.

Webhooks are no solution in this case, as they would be "too slow". I am eg setting permissions and creating list based on settings of an item. This therefore needs to be quite "live", cannot wait for minutes here. Moreover, the system mentioned is already in End of life and will be removed in 2027 anyway, so a refactoring is too much in this case

On Dienstag, 25. Nov. 2025, 22:59, wrote:

kachihro left a comment (pnp/powershell#5149) Can you consider re-purposing and using WebHooks ?? Remote Event Receivers have been deprecated - and will stop working in April,2026 https://www.powercommunity.com/remote-event-receivers-retirement-update-in-sharepoint-online/ -- Reply to this email directly or view it on GitHub: https://github.com/pnp/powershell/issues/5149#issuecomment-3577749394 You are receiving this because you authored the thread. Message ID:

LeopoldLerch avatar Nov 26 '25 13:11 LeopoldLerch