Forum Discussion

Charles Willwerth's avatar
Charles Willwerth
Brass Contributor
Sep 21, 2017
Solved

Microsoft Flow And Remote Event Receivers

I am trying to set up a Microsoft Flow on a SharePoint Online site that creates an item on a list I have an existing (working) Remote Event Receiver.

 

When the flow creates the item in the list, the RER is not getting fired off.  When I manually (i.e. through the SharePoint UI) create an item in the list the event is fired.

 

Is this expected behavior? Is there a way to force the event to fire through Flow?

  • Are you 100% sure that it's not fired? I am asking this because we were facing a similar situation. In our case it was an other app that was performing an action. It was authenticating using client id and client secret. The event actually did fire but failed at authentication. We followed an example from PnP and it was trying to authticate using the received accesstoken. When the event was fired by an app it was not receiving a correct accesstoken to be able to authenticate.

     

    We switched to app only authenication (as fallback authentication method) using client id and secret to overcome this issue. 

     

    Try putting some logging before creating the client context and see if the remote event receiver is called. 

     

    Good luck!

3 Replies

  • Are you 100% sure that it's not fired? I am asking this because we were facing a similar situation. In our case it was an other app that was performing an action. It was authenticating using client id and client secret. The event actually did fire but failed at authentication. We followed an example from PnP and it was trying to authticate using the received accesstoken. When the event was fired by an app it was not receiving a correct accesstoken to be able to authenticate.

     

    We switched to app only authenication (as fallback authentication method) using client id and secret to overcome this issue. 

     

    Try putting some logging before creating the client context and see if the remote event receiver is called. 

     

    Good luck!

    • Charles Willwerth's avatar
      Charles Willwerth
      Brass Contributor

      Suleyman Ayazalp, Thank you for forcing me to look at logging.  I had completely forgotten that I was trapping on "Updated" tasks only, and not "Created" tasks. So, while I had lots of logging for what happens when things were updated, I wasn't getting anything in my "Updated" routing.  So, once I added the logging per your suggestion, I realized the error of my ways.

Resources