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 workinghttp://localhost:7048/gasorgn/api/BizNP/biobizapi/v1.0/companies(3530cd87-f0b2-ec11-9111-82e8be684e31)/generalledgerentries?tenant=gasmasterBut while using the filter this way, it is not workinghttp://localhost:7048/gasorgn/api/BizNP/biobizapi/v1.0/companies(3530cd87-f0b2-ec11-9111-82e8be684e31)/generalledgerentries?$filter=PostingDate eq 2022-03-15?tenant=gasmasterLikewise, use of expand on standard api also does not workhttp://localhost:7048/gasorgn/api/v2.0/companies(3530cd87-f0b2-ec11-9111-82e8be684e31)/customers?$expand=contactsInformation?tenant=gasmasterThey 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.
Hi, I used to sort out the Filters method in APIs.Hope the below will help you too.
More details: https://yzhums.com/6117/
After some research I found out the correct to embed both filter and tenant both at once to API url is through & operator instead of ? operator that I used in my question. So, the correct url would be:
http://localhost:7048/gasorgn/api/BizNP/biobizapi/v1.0/companies(3530cd87-f0b2-ec11-9111-82e8be684e31)/generalledgerentries?$filter=PostingDate eq 2022-03-15&tenant=gasmaster
Hello,
If you don't get further responses to this issue, you may want to raise a support request to Microsoft support via your CSP / Partner.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Mansi Soni as our August 2025 Community…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Sohail Ahmed 2,899 Super User 2025 Season 2
Sumit Singh 2,444
Jeffrey Bulanadi 2,304