web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 101

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
    101 on at
    RE: UK Making tax digital - Cannot get an authorization code for sandbox (error)

    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
    RE: UK Making tax digital - Cannot get an authorization code for sandbox (error)

    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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,029

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 582 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans