All Docs
FeaturesMaking Tax DigitalUpdated February 27, 2026

Bug Fix: HMRC Re-authorise Button Now Works Correctly

Bug Fix: HMRC Re-authorise Button Now Works Correctly

Release: v1.0.142
Severity: High
Affected area: HMRC Connection Panel


What was the problem?

When your HMRC connection token expires, the HMRC Connection Panel displays a Re-authorise button prompting you to renew access. In previous versions, this button was wired to the wrong action: instead of starting the HMRC OAuth flow, it called the same disconnect mutation used by the Disconnect button.

This meant that landlords clicking Re-authorise were unknowingly disconnecting their HMRC account entirely, rather than renewing their authorisation. The connection, including any associated account state, would be removed — forcing a full reconnection from scratch.

This was a silent failure: there was no warning, no confirmation, and no indication that anything had gone wrong until the user noticed their connection was gone.


Who was affected?

Any landlord whose HMRC authorisation token had reached expired status and who clicked the Re-authorise button on the HMRC Connection Panel.

HMRC OAuth tokens expire periodically as part of the Making Tax Digital security model, so this was a realistic scenario for active users.


What has been fixed?

The Re-authorise button's click handler now correctly calls getAuthoriseUrl.mutate({ niNumber }), which redirects you to HMRC to complete the OAuth flow and renew your access token.

The fix also improves the NI number handling:

  • If your NI number is available from the status endpoint, it is pre-filled automatically — you will not be asked to re-enter it.
  • If your NI number is not available from the status endpoint, the existing NI number entry form (NinoForm) is shown inline above the Re-authorise button so you can provide it before proceeding.

In both cases, clicking Re-authorise now takes you through the correct HMRC authorisation redirect, just as it does during an initial connection.


What should I do?

No action is required. The fix is live in v1.0.142.

If you previously clicked Re-authorise and found your HMRC account was disconnected rather than renewed, you will need to reconnect:

  1. Navigate to Dashboard → HMRC.
  2. Click Connect to HMRC.
  3. Enter your National Insurance number when prompted.
  4. Complete the HMRC OAuth authorisation flow.

Your quarterly submission history and property data are not affected by a disconnection — only the live HMRC authorisation token is removed.


Technical detail

The root cause was an incorrect onClick binding in hmrc-connection-panel.tsx. The expired status branch of the panel rendered a Re-authorise button but reused the disconnect.mutate() call from the disconnect branch rather than invoking getAuthoriseUrl.mutate({ niNumber }). The fix corrects the binding and adds NI number retrieval logic to ensure the OAuth flow can be initiated without requiring the user to re-enter previously collected data.