web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

UK Making tax digital - Cannot get an authorization code for sandbox (error)

(0) ShareShare
ReportReport
Posted on by 105

Hello,

I am trying to get an authorization code for the sandbox environment to test MTD functionality but I am facing the following error:

{"error":"invalid_request","error_description":"redirect_uri is invalid"}

I am using the standard redirect URL and have not changed this value.

I have also done all the necessary setup:

1. Create a developer account in HMRC website

2. Register an application and get the Client ID and Client secret

3. Entered the above values to the "Web applications" page in the Tax module

pastedimage1617167755149v1.png

4. Created a test user in the HMRC website

4. Entered the VAT registration number in the legal entity (Legal entities > Registration IDs) based on the test user data

pastedimage1617167768849v2.png

5. Entered the VAT registration number to the VAT exempt number export and import fields:

pastedimage1617167883948v3.png

When I try to get the authorization code, the error occurs and I am not directed to a webpage where I can enter the user credentials.

Did anyone have the same issue and if yes, how was it solved?

Thank you,

Mika

I have the same question (0)
  • Suggested answer
    Mika Hartio Profile Picture
    105 on at

    I was able to solve the issue.

    The fix was to register the redirect URI within the HMRC developer hub.

    Open the application details and there should be a menu for "Redirect URIs". Register the D365 standard redirect URI found in the "Web applications" page.

    pastedimage1617611263019v1.png

  • Suggested answer
    Sheela Ningappa Profile Picture
    on at

    HI,

    Good you were able to resolve the issue. I will close this thread.

    Thanks,

    Sheela

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans