powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] Remote Event Receiver is not called when created with Add-PnPEventReceiver

Open ssandu opened this issue 5 years ago • 2 comments

Reporting an Issue or Missing Feature

Remote Event Receiver web service is not called when created with Add-PnPEventReceiver and the event is happening.

Expected behavior

RER should call it's external url web service

Actual behavior

Seems like it doesn't have rights to web From ULS logs The app i:0i.t|ms.sp.ntv|31359c7f-bd7e-475c-86db-fdb8c937548e@9b3ac268-aeba-4a2b-94af-1f885116765a does not have required permission Manage on list 37a10755-2f51-42b1-871a-c888fefc89b1. SitePerm=None, WebPerm=None, ListPerm=None Calling 'https://myurl/.....svc, i:0i.t|ms.sp.ntv|31359c7f-bd7e-475c-86db-fdb8c937548e@9b3ac268-aeba-4a2b-94af-1f885116765a' is not allowed because its app does not have the permission. App with GUID 31359c7f-bd7e-475c-86db-fdb8c937548e is PnP Office 365 Management Shell

Steps to reproduce behavior

Connect-PnPOnline https://{tenant}.sharepoint.com/sites/eventreceivers Add-PnPEventReceiver -Name "TestEventReceiver" -Url "https://{url}/testold.svc" -List "testevent" -EventReceiverType ItemUpdated -Synchronization Asynchronous -SequenceNumber 10001 Set-PnPListItem -List "testevent" -Identity 1 -Values @{"Title" = "test3"}

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

1.5.0

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

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

ssandu avatar Apr 12 '21 09:04 ssandu

Same like #464

Seems to be an issue from Microsoft confusing AAD-registered apps with delegated permissions with Provider-hosted-add-ins. Short story, if you use for the registration a Token with an appId in it (what a token usually has, at least in v1-Version), that appId ist stored together with the registered RER. When executing, Sharepoint seems to lookup that appid in it´s Sharepoint-Principals used for Provder-hosted-Addins with Application Permissions. However there is none of course, and even if there is one, the Host of that registered App will most likely not correspond with the domain of your RER.

Please make an Issue at MS. They say I am the only one that has this issue. However, prepare for a long run, as they will close the issue as soon as they hear "PnP", telling you that it is a issue from PnP (which isn´t).

LeopoldLerch avatar Apr 12 '21 10:04 LeopoldLerch

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Apr 27 '21 01:04 github-actions[bot]