I am working on a freshdesk-app to integrate Business Central with Freshdesk. I am unable to get the Oauth2 access token from Microsoft in local because i can’t add the local redirect URL with the query params to App registrations in Azure.
If the third-party system doesn’t allow a localhost URL, you could run FDK with the command, fdk run --tunnel. It will generate an HTTPS domain that can be accessed over the internet. It will look like the following.
Establishing ngrok tunnel. Please wait...
Tunnel Open. Tunnel URL: https://e1cd-xxxxxxxxxxxxxxxxxxxxxxxxxxx-3f5b.ngrok.io
Starting local testing server at http://*:10001/
Append 'dev=true' to your Freshdesk account URL to start testing
e.g. https://domain.freshdesk.com/a/tickets/1?dev=true
Quit the server with Control-C.
To simulate product, app setup, and external events, visit - http://localhost:10001/web/test
Populating test data with events found in the app
To test the installation page, visit - http://localhost:10001/custom_configs
The tunnel domain (without any port) can be used in place of the localhost domain and port for local testing of OAuth 2.0.
Thank you for your answer. Microsoft’s Oauth system does allow localhost URLs. I did however find out what my problem was: I assumed that the whitespace after “?callback=” was there by mistake and deleted it. Here’s how i made it work:
First i clicked on authorize of my app:
I then copied the redirect url shown in the microsoft error: