I have had nothing but issues when trying to develop my application to connect to D365 Business Central. I have absolutely no issue connecting to our various environments via PostMan, but replicating that in C# doesn't seem to work. I have read every document on the Microsoft Docs site related to authenticating (Open, Basic, etc.) and none of them are up-to-date. None of them address the issue of someone attempting to create an application (let's say something simple like a console application) and have it connect to the D365 BC ODATA services. The only documentation I could find was for a locally-hosted instance. When you attempt to add a connected service in VS2019 for D365, it returns a 401 Unauthorized.
Can anyone show me documentation on any authentication method for a web service to connect to D365 Business Central without user interaction? This will be for development and production use, so whatever is suggested has to work for both.