Workflow using FIM PS module - problem


I have a problem when I try to use the FIM Powershell Module (using import-module FIM) in a script using the FIM Powershell Workflow extension.
I randomly get post processing errors connected to the function "Get-FIMResource" and in the eventlog on the FIM Server I have errors connected to the Microsoft.resourcemanagement provider. (Requestor: Internal Service
Correlation Identifier: 2efd84f5-fb62-486b-9abe-85ef9f59ea18
Microsoft.ResourceManagement.Service: Microsoft.ResourceManagement.WebServices.Exceptions.UnwillingToPerformException: IdentityIsNotFound
at Microsoft.ResourceManagement.WebServices.ResourceManagementService.GetUserFromSecurityIdentifier(SecurityIdentifier securityIdentifier)
at Microsoft.ResourceManagement.WebServices.ResourceManagementService.GetCurrentUser()
at Microsoft.ResourceManagement.WebServices.ResourceManagementService.Enumerate(Message request)).
I run on FIM 2010 R2 RC1.
Please fint the script attached.
BR /RiBo

file attachments

Closed May 2, 2014 at 12:30 AM by adweigert
This can happen if the user that the workflow activity is running as isn't in the FIM portal/service as a valid user with a matching SID.