Greetings to Everyone.
I am having trouble figuring out the proper usage of filter with OnPrem Business Central Api. We have used multi-tenant deployment.
This is working
http://localhost:7048/gasorgn/api/BizNP/biobizapi/v1.0/companies(3530cd87-f0b2-ec11-9111-82e8be684e31)/generalledgerentries?tenant=gasmaster
But while using the filter this way, it is not working
http://localhost:7048/gasorgn/api/BizNP/biobizapi/v1.0/companies(3530cd87-f0b2-ec11-9111-82e8be684e31)/generalledgerentries?$filter=PostingDate eq 2022-03-15?tenant=gasmaster
Likewise, use of expand on standard api also does not work
http://localhost:7048/gasorgn/api/v2.0/companies(3530cd87-f0b2-ec11-9111-82e8be684e31)/customers?$expand=contactsInformation?tenant=gasmaster
They Give the following message
{"error":{"code":"Authentication_InvalidCredentials","message":"Web service call failed because user could not be authenticated or authorized. CorrelationId: ae68c640-ec54-43f2-90b9-27c80fdb1f45."}}
I would be grateful for any help or suggestions.
Answers
http://localhost:7048/gasorgn/api/BizNP/biobizapi/v1.0/companies(3530cd87-f0b2-ec11-9111-82e8be684e31)/generalledgerentries?$filter=PostingDate eq 2022-03-15&tenant=gasmaster