Notifications
Announcements
No record found.
Create new Test User generates 401 web service error when trying to generate a new test user.
{"code": "INVALID_CREDENTIALS", "message": "Invalid Authentication information provided"}The client ID and secret was copied and pasted to the Sandbox HMRC in the web applicationsbut i can not create a test user to go to the next step of getting an authentication code.Messages
Moved to the Dynamics 365 Finance forum.
Hi Philip,
The Server Token field also needs a value. Have a look at the documentation: docs.microsoft.com/.../emea-gbr-mtd-vat-integration
Thanks Andre,
I have studied that document now for 2 days and I'm missing something.. you can not request a token without the authorization code, and you can't get the authorization code if you don't have a test user. I cannot create a test user that is when i get the Issue, when I'm supposed to get user login credentials back from HMRC. This is specifically on the Sandbox HMRC web application. so somewhere I'm doing something wrong.
https://docs.microsoft.com/en-us/dynamics365/finance/localizations/emea-gbr-mtd-vat-integration#obtain-an-authorization-code-for-the-sandbox-environment
I have a HMRC login i created and i copied the Client ID and Secret to the Sandbox HMRC and then i try to create a test user so i can get the VRN and system test user and password info.txt so i can get the access code and token.
This information (step 1 and 2) is omitted from any documentation for when setting it up the first time:
The registered HMRC user and the test user is not the same record and new test user must be created the first time.
HMRC has recently changed the process for creating a TEST User. It is no longer created from within D365FO Electronic massages [as it was for the last year or so]. Now you need to create the TEST User from within HMRC's site.
Using this URL: developer.service.hmrc.gov.uk/api-test-use
Select the Organisation option > select Create and the necessary credentials will be created for you. Then use them to get the Authorisation code and Obtain access token.
Regards,
Steve
Hi Philips,
Agree with Steve's Comment.
Process has changed. Test user has to be created from HMRC site.
developer.service.hmrc.gov.uk/.../user
It works for me! so should work for you.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 592 Most Valuable Professional
André Arnaud de Cal... 478 Super User 2025 Season 2
BillurSamdancioglu 305 Most Valuable Professional