0
Answered

Import from connector failed with reason User Not Found. User: None

Tom Parker 5 years ago in PowerShell connector updated by Beau Harrison (Senior Product Software Engineer) 5 years ago 5

Hi is there any guidance on what this error means? I'm getting it on imports on a powershell connector. I assumed that it meant it's trying to commit an entity that's missing some attribute but the code seems to be correct. Snippet and error follow.

Only ID is a required attribute.

Relevant part of import.ps1


if ($msoluser.ImmutableID)

{

## Create or update IdB entity

$entity = $entities.Create()

$entity['ID'] = $msoluser.ImmutableID

$entity['UPN'] = $msoluser.UserPrincipalName

$entity['isLicensed'] = $msoluser.isLicensed

$entity['Alumni'] = $Alumni

$entity['UserStatus'] = $UserStatus

$entity['CheckLicense'] = $CheckLicense

$entity.Commit()

}

Error in IDB logs:

Import changes from connector Office 365 Student Connector failed with reason User Not Found.  User: none.. Duration: 00:45:45.8101253
Error details:
Microsoft.Online.Administration.Automation.MicrosoftOnlineException: User Not Found.  User: none.
   at Unify.Product.IdentityBroker.PowerShellConnector.d__30.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Unify.Framework.Collections.ActionOnExceptionEnumerator`1.MoveNext()
   at Unify.Framework.Collections.EnumerableExtensions.d__10`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Unify.Product.IdentityBroker.ChangeDetectionEntityPollJob.RunBase()
   at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
   at Unify.Product.IdentityBroker.ConnectorJobExecutor.<>c__DisplayClass33_0.b__0()
   at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)",Normal

Answer

+1
Answer
Answered

Hi Tom, based of the exception type it looks like an exception generated by the Microsoft code that's fetching a user.

Microsoft.Online.Administration.Automation.MicrosoftOnlineException: User Not Found.  User: none.

Using the PowerShell logger to add additional logging around keep parts of the script should help you confirm this and debug further.

+1
Answer
Answered

Hi Tom, based of the exception type it looks like an exception generated by the Microsoft code that's fetching a user.

Microsoft.Online.Administration.Automation.MicrosoftOnlineException: User Not Found.  User: none.

Using the PowerShell logger to add additional logging around keep parts of the script should help you confirm this and debug further.

Thank Beau, that sounds be it.

Just a further question:In the settings tab of the powershell connector there's a space where you can put the powershell script for import all, import changes method, add entities, update entities, etc. When does the update entities script get called? Is it when new data is pushed to the connector from some source (like MIM)?

Yes, when there are changes to existing connector entities, the update script is run on those entities.

If an error were to occur during that stage would it appear as an error (with the red ! and all) on the "import changes" operation run result?

That should be the case, provided the script allows the exception to bubble back into Broker. Add a throw 'message' to the script if you want to test this out and see how it's shown on the UI and in the logs.