Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLIENT_OR_AGENT_NOT_AUTHORISED when requesting obligations as an agent #875

Closed
Bittarman opened this issue Oct 8, 2021 · 8 comments
Closed

Comments

@Bittarman
Copy link

CLIENT_OR_AGENT_NOT_AUTHORISED when requesting obligations as an agent

When using the agent authorisation API, we are able to successfully invite an organisation and an individual created with the CreateUser api.

However, when we then try to use the agents credentials with the MTD-VAT api, we receive a CLIENT_OR_AGENT_NOT_AUTHORISED error.

We have checked using the agent authorisation api that the relationship exists before attempting to fetch the vat obligations of the organisation

We are able to use the MTD-VAT api if we use a token from one of those accounts, just not with the agent account token once it has been accepted for the organisation or individual.

The VAT number for an organisation used for this is 237943241
The ARN for an agent we have used for this is TARN0975056

We have only used the sandbox API for this

@hmrc-api-team
Copy link

Hi Bittarman,

Unfortunately agent users aren't currently not working in the Sandbox environment. We will raise this with the relevant team.

Kind regards,

MTD API Team

@steveetm
Copy link

steveetm commented Nov 8, 2021

I don't know if it is related, but for a while we can successfully authenticate in sandbox environment with test users, getting access token properly, but after that every obligation request and even fraud prevention header test api requests return cloudfront error.

@hmrc-api-team can you please confirm if the sandbox env is broken right now, or it should work?

@zmagyar
Copy link

zmagyar commented Nov 10, 2021

@hmrc-api-team is there any update on this please? We are delaying a significant release of our app at the moment as this issue stops us to test the application.

@Benjamindyer
Copy link

Just echoing what others have said, the Sandbox environment is dead for us at the moment.

@hmrc-api-team
Copy link

Hi all, apologies for the delayed response. The team responsible for creating Agent users are aware of this issue and we have been told that they will be working on a fix soon. We have done some preliminary investigation before raising the issue with them so hopefully that will expedite the process.

Since this is an issue that sits outside the code within the vat-api itself, we cannot comment on when exactly this fix will go into Sandbox however we will endeavour to keep you all updated on this Issues thread when it goes in.

Kind regards

@Bittarman
Copy link
Author

Thanks for the update @hmrc-api-team

@hmrc-api-team
Copy link

Hi @Bittarman, @Benjamindyer, @zmagyar, @steveetm,

Please could you try requesting Obligations as an Agent again? We have been advised that the team responsible has pushed a fix in for this last night.

Kind regards

@hmrc-api-team
Copy link

Hi @Bittarman, @Benjamindyer, @zmagyar, @steveetm,

We have tested Agents in Sandbox ourselves and can see they are now working. If you require assistance setting up an Agent, please follow the Guide.

If you have any further questions, please leave them below. If you have followed the Guide above and still find that Agents are not working for you, please re-open this Issue with steps to reproduce.

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants