While setting up Analytics module, if there is an existing tag found and the user has no analytics accounts the message shown is incorrect, indicating the user needs to create an account.
The message shown should inform of the existing tag coming from an external source, and that the user does not have access to it.
Currently:

Expecting:

_Do not alter or remove anything below. The following sections will be managed by moderators only._
When requesting tag-permission
https://github.com/google/site-kit-wp/blob/b42304c5e577eb13fa5934bd9c02f2a0cba1e44b/assets/js/modules/analytics/setup.js#L95
if the user has no access to the existing tag found the response will throw an error, therefor getAccounts() doesn't get called and existingTag state is never set.
We can rely on errorCode state to prevent from rendering dropdowns or create account/re-fetch buttons.
Add the following statement after isLoading check
if ( 'google_analytics_existing_tag_permission' === errorCode ) {
return null;
}
This way we will only be rendering the error message from tag-permission response.
@lucymtc Acceptance criteria look good (taken from #358, for reference), feel free to start with the implementation brief.
@felixarntz we need to change the order of steps, currently getAccounts() is first called and then getExistingTag()
It will likely be fixed with https://github.com/google/site-kit-wp/issues/83
@lucymtc You can reference #83 in the IB as a blocker and write the rest of it based on that already being implemented.
@felixarntz confirming this issue is fixed with latest changes merged from https://github.com/google/site-kit-wp/issues/83
Following the steps to reproduce and seeing the expected message:

@lucymtc Note that the ACs state the buttons should not appear in this scenario because the user is blocked. This is a small change we'd still need to make I believe.
Double-checking with @marrrmarrr - if there is an existing tag and the user does not have an account, they should not be able to create one right? The buttons should not be visible?
@lucymtc I confirmed with @marrrmarrr, there shouldn't be any buttons to create a new account or re-fetch if there's an existing tag. Let's address that as part of this issue. If there's an existing account, the user should not be able to proceed (only see the "Cancel" link).
IB ✅
@felixarntz this one is blocking #358 so please move that one out of blocked as soon as this one is no longer blocking.
Works well in my testing; moving to "Acceptance".
I tested analytics setup with a user that didn't have access to the property of the tag present in the site theme, seeing this message:

At this point I am blocked from proceeding as expected.
I logged in again as the correct user who does have access to the tag that is already on the site, the UI correctly showed the property preselected, and the UI was "disabled" or locked to the property ID that I had inserted into the theme header:
