Hello Experts,
I have an issue I hope you can help me with. I have an API call to try and get the list of companies in Business Central using an OAUTH2 token.
GET REQUEST from Postman: api.businesscentral.dynamics.com/.../<environment name>/api/v2.0/companies
When I send this request in postman I am getting a 200 OK response which is good, but there are no company values available to me. (the response reads "Value": []) In order to try and solve this issue I was playing around with connecting with Web Service Access Key and I was able to pull a list of production environments, so I thought maybe I could sneak by and enter the company as I already know it and try to access Companies(CompanyID)/customers but I got an error that I do not have access to the company.
I was wondering where I went wrong in setup? I have added my Azure AD app to Business Central in the Azure AD application card, Is it a problem with the user who is accessing the token? Are they unable to reach the company? truthfully, I am cobbling together my knowledge from lots of different MS articles that I have read on the subject and am a little out of my element.
If you can point me in the direction of the problem, and/or additional reading that will help me solve this issue, and get a better understanding of API and Business Central in general that would be much appreciated.
Thanks for your time,