Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Write validation failed for table row of type 'EssLeaveRequestEntity'. Infolog: Warning: Only leave requests for the current user can be created by this entity..

(0) ShareShare
ReportReport
Posted on by 5

Hi, 

     We are getting error while hitting dynamic HR "MyLeaveRequests" rest API for applying leave to employee with admin authorization. If use respective employee authorization, it working fine.  

Scenario:

If "A" was a system administrator role and "B" was an employee.

We can create leave request for B with access token of "B". But same couldn't able to done by access token of "A" 

Error Message:

"error": {
"code": "",
"message": "An error has occurred.",
"innererror": {
"message": "Write validation failed for table row of type 'EssLeaveRequestEntity'. Infolog: Warning: Only leave requests for the current user can be created by this entity..",
"type": "Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataValidateWriteException",
"stacktrace": " at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateProcessor.CreateEntity_Save(ChangeOperationContext context, ChangeInfo changeInfo)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateManager.<>c__DisplayClass10_0.<CreateEntity>b__1(ChangeOperationContext context)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.ExecuteActionsInCompanyContext(IEnumerable`1 actionList, ChangeOperationContext operationContext)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.TrySave(ChangeOperationContext operationContext)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateManager.SaveChanges()\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataDelegatingHandler.<SaveChangesAsync>d__3.MoveNext()"
}
}

We are stuck here...So kindly share your ideas for take us out from this issue

  • Suggested answer
    Parag Chapre Profile Picture
    12,252 Most Valuable Professional on at
    RE: Write validation failed for table row of type 'EssLeaveRequestEntity'. Infolog: Warning: Only leave requests for the current user can be created by this entity..

    Hi Mohanbalaji,

    Instead of using EssLeaveRequestEntity, Make B as a manager of A and use Leave time off request V2 or Leave of absence request entity.

  • André Arnaud de Calavon Profile Picture
    295,265 Super User 2025 Season 1 on at
    RE: Write validation failed for table row of type 'EssLeaveRequestEntity'. Infolog: Warning: Only leave requests for the current user can be created by this entity..

    Hi Mohanbalaji,

    When you are using this entity, the leave request needs to be entered by the user itself. What is the reason that another user should request the leave than the worker who is involved?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Product updates

Dynamics 365 release plans