Skip to content

User does not have sufficient permissions for this profile #63

@enzedonline

Description

@enzedonline

I've gone through all the setup instructions, and looked through previous Issues here but can't find any solution to getting this working. I'm wondering if there's been Google updates that have broken this? Initially I thought it might be because my Analytics property is GA4, so I created a 2nd one that's GA3/GA4, but the same issue persists.

Console errors:

Uncaught (in promise) 
{error: {…}}
error:
code: 403
errors: [{…}]
message: "User does not have sufficient permissions for this profile."

https://content.googleapis.com/analytics/v3/data/ga?start-date=2021-07-16&end-date=2021-08-15&ids=ga%3A_[propertyID]_&dimensions=ga%3Adate%2Cga%3AnthDay&metrics=ga%3Asessions&_src=embed-api%3Av1

Browsing to the above url (ID removed) gives the following output:

{
  "error": {
    "code": 401,
    "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "errors": [
      {
        "message": "Login Required.",
        "domain": "global",
        "reason": "required",
        "location": "Authorization",
        "locationType": "header"
      }
    ],
    "status": "UNAUTHENTICATED"
  }
}

It's not that useful a message in the end as any malformed or even missing data seems to produce the same error. The best I can take from that is that none of login credential info is getting through. The instructions for GA_KEY_FILEPATH are a little ambiguous (is this an OS path or partial URL?) - I tried both and also using the GA_KEY_CONTENT to make sure. Same result.

Steps I've followed (and re-followed from scratch to make sure I'm not doing something stupid):

  • Create new project in Cloud console.
  • Enable Analytics API
  • Create service account with Viewer role.
  • Create key.
  • Copy service account email address.
  • In Analytics console, add service account email address to property with Read & Analyse access.
  • Add relevant entries to local.py using property ID from property settings. I've tried with both GA_KEY_FILEPATH and GA_KEY_CONTENT.

From cloud console:
image

From analytics console:
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions