Forum Discussion
Bernd Verhofstadt
Feb 12, 2018Iron Contributor
Azure Function and SharePoint PnP PowerShell are mixing up the client context
Hi,
I'm experimenting with Azure Function, Logic apps/Flow to replace an existing SharePoint Workflow.
I've found a weird issue where the client context get mixed up when multiple flows are running in parallel and try to call the azure function. I've found a workaround to overcome this issue by allowing only one job on the azure function environment. It's not a good solution, therefor I want to find the root cause of the following error message :
Exception calling "Load" with "1" argument(s): "The object is used in the context different from the one associated with the object."
Has someone encounter a similar issue?
Cheers
Bernd
3 Replies
- Bernd VerhofstadtIron ContributorSame issue:
https://social.msdn.microsoft.com/Forums/azure/en-US/28bff860-e990-4b89-bf67-e6af4efef442/pnp-powershell-in-azure-function-fails-when-to-fast-triggerd-in-a-time-intervall?forum=AzureFunctions- Warwick WardBronze ContributorThis is interesting, do you know if it's still the case now days?
- Miroslav675Copper Contributor
I'm still having the same issue...
My use case is with getting properties of a SharePoint Online item that was just created with Copy-PnPFile