grafana icon indicating copy to clipboard operation
grafana copied to clipboard

Google SSO: User Sync Failed

Open kcharwood opened this issue 1 year ago • 1 comments

What happened?

I setup Google SSO Auth with the new feature flag in 10.4.2.

Upon logging in I got the following error:

Login failed
User sync failed

Upon checking the logs, it looks like it was trying to attach the user to organization ID 1, which in my environment, has been deleted.

Is there a way to attach what organization the user should get attached to? Perhaps an optional UI field or an environment variable setting?

Screenshot 2024-04-24 at 3 43 33 PM

What did you expect to happen?

I expected auth to "just work"

Did this work before?

No

How do we reproduce it?

  1. Create a second organization with id 2
  2. Delete organization with id 1
  3. Setup Google OAuth2 flow
  4. Attempt to login
  5. See Error

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana: 10.4.2 OS: Mac Browser: Chrome

Grafana platform?

Kubernetes

Datasource(s)?

No response

kcharwood avatar Apr 24 '24 20:04 kcharwood

Same problem here. After deleting the Org ID 1, the Google authentication fails.

markhc avatar May 03 '24 12:05 markhc

I still have Org ID 1 and this fails for me too.

jeffpaulKinsta avatar May 30 '24 18:05 jeffpaulKinsta

@kcharwood @markhc You need to update the auto_assign_org auto_assign_org_id settings.

mgyongyosi avatar May 31 '24 11:05 mgyongyosi