Announcements
No record found.
Hi,
I am using the Microsoft dynamics Audit API https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/audit?view=dynamics-ce-odata-9
When i use the userid property(listed under Single value navigation property) it does not work and gives this 400 error:
Request <instanceurl>/api/data/v9.0/audits?$expand=userid
{"error":{"code":"0x80040216","message":"Only inner join is supported for Audit query."}}
Can somebody help get a solution to this or suggest an alternative to fetch the useremail address for the audit entry created?
Thanks,Sheetal
Sadly not all relationships can be expanded (or filtered) using the WebAPI tables. You can eventually try to create a fetchxml (using FetchXML Builer inside XrmToolBox) and execute the fetchxml with Web API (you can eventually use my tool Dataverse REST Builder, link in my signature, to generate the code, the action is Predefined Query).If is not possible with fetchxml (or you don't want to use it) the alternative is to do a second request to the systemuser table to fetch the columns based on the id you get from the first query.
hope it helps
Hi Guido,
Thanks for the reply.
Making an additional call for mapping every userid seems to be a bit expensive for our use case.
However, it is weird that the query parameter used to work some time back and as mentioned in the document it is a single navigation property, hence assuming expand parameter should be working now too.
However, the expand=userid parameter suddenly stopped working and started throwing the 400 error.
Any help on understanding why this feature suddenly stopped working and an easier alternative to fetch the userid of the audit change, would be of much help!
Thanks,
Sheetal Shetty
as I wrote before you can try with a fetchxml query, however if your users are less than 5000, you can do a single query to the systemuser table and cache the results, it's an alternative you have
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
ManoVerse 184 Super User 2026 Season 1
11manish 138
CU11031447-0 100