Gadget to whitelist the required Microsoft/Azure endpoints
im trying to integrate the dvsa mot api to retreive vehicle details,
i can get it to work outside of gadget but it wont connect inside gadget
The issue appears to be that the MOT API calls are being made but may be encountering network connectivity issues specific to Gadget's infrastructure. Based on the earlier conversation history, this was a known problem - Gadget's network has restrictions that prevent outbound connections to certain Azure/Microsoft endpoints.
The key issue from the conversation history shows that Gadget's network infrastructure blocks outbound connections to Azure AD and other Microsoft services, which is why the OAuth2 authentication to get the access token is failing.
Unfortunately, this means the MOT API integration cannot work in the current Gadget environment due to these network restrictions. Here's what's happening:
Network Restriction: Gadget blocks outbound connections to login.microsoftonline.com (Azure AD)
OAuth2 Required: The MOT API requires OAuth2 authentication through Azure AD
No Workaround: Without being able to authenticate with Azure AD, we cannot get access tokens for the MOT API
Possible Solutions:
Contact Gadget Support: Ask Gadget to whitelist the required Microsoft/Azure endpoints:
login.microsoftonline.com
history.mot.api.gov.uk
Use a Proxy Service: Set up an external proxy/bridge service that handles the OAuth2 authentication and forwards requests
Alternative Approach: Use a different vehicle data source that doesn't require Azure AD authentication
Mock Data for Development: For now, you could implement mock MOT data responses to continue developing other features
3 Replies
Gadget provides IPs which you can whitelist
https://docs.gadget.dev/guides/faq#if-i-require-ip-whitelisting-is-gadget-able-to-provide-me-with-an-ip-address
its saying that gadget is stopping from accessing the domains
Hello,
Could you please share some more information like traceIds, images, and whatever else to help us investigate this? The Gadget infrastructure should not be blocking any requests and whitelisting a URL should not be required by our team