6

I am using the Google Admin SDK APIs to manage users (create/update) in our organization's Google apps account. We allow users to optionally use the 2-factor authentication feature and I'd like to be able to determine if an account has it enabled or not when one of our internal support reps looks up their account. Looking over the docs at https://developers.google.com/admin-sdk/directory/v1/reference/users, I do not see any attributes that would indicate this setting.

Is there another way for me to check if it is enabled via an API?

Phillip
  • 643
  • 6
  • 15

1 Answers1

5

Saw an answer from an old Stackoverflow post:

Find all Google Apps users not using two-factor authentication

You can actually find that information via Reports API of Admin SDK: https://developers.google.com/admin-sdk/reports/v1/reference/usage-ref-appendix-a/users-accounts

Hope this helps!

Community
  • 1
  • 1
Emily
  • 1,464
  • 1
  • 9
  • 12
  • 2
    Thank you very much @Emily for the suggestion. I did some testing with that API today and found that while it is possible to get the information, it isn't in a very useful way. That API requires you to specify the exact date you want usage information for, so I'd have to know the exact date a user either enabled/disabled 2-factor auth. Also the newest data available is 4 days old, so I cant get real time information that would be most useful for supporting our users. So this may need to be a feature request for the Directory API. – Phillip Oct 23 '14 at 15:25
  • I thing you can get MFA status from two field `isEnrolled2fa` and `isEnforced2fa` when making a call to GetUser in Directory APsi. – yodellingbutters May 06 '21 at 18:16