Getting Directory_ObjectNotFound error while trying to update external user through API

A V 20 Reputation points
2025-04-10T06:22:51.26+00:00
  1. Generate Token
  2. Create User (Sending Invitation for External Users)
  3. Polling for User Provisioning (It retries up to 5 times with a delay of 5 seconds between attempts.)
  4. patch call to update the user

While executing script I am getting this below error:

{"error":{"code":"Directory_ObjectNotFound","message":"Unable to read the company information from the directory.","innerError":{"date":"2025-04-10T06:15:53","request-id":"aa64687d-b167-446a-814f-c4711b30e8b1","client-request-id":"aa64687d-b167-446a-814f-c4711b30e8b1"}}}

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,274 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.