13 thoughts on “Google Admin SDK APIs and .net integration – Changing a users password

  1. Hey Mike. Thanks for figuring all of this stuff out. I do find this post really helpful so thanks for sharing.

  2. Great write up. It is amazing how little information there is on how to use this stuff. I am trying to modify this to use the ReportsService instead. Do you know of any examples to be had online?

  3. Google needs to hire you! Thanks for helping me finally figure this out after days of running around in circles.

  4. Hi Mike – thanks so much for this post. It’s the only working example that I’ve been able to find for accessing the Directory API. It’s hard to believe that Google released this API with so little support… I have no idea how you managed to figure out how to use the .NET class library without so much as a quickstart sample.

    I’m trying to migrate a couple of calls from the old API to the new API, but I’m hitting a problem with figuring out to provide credentials for different domains, without creating a Service Account for every domain. Do you have any suggestions?

    I wrote up my problem in detail here: http://stackoverflow.com/questions/28375098/google-admin-sdk-directory-api-getting-groups-from-varying-domains

  5. I owe you a beer… this is a great and concise article, I agree this is the only working example out there, thanks a lot for sharing

  6. Mike, this was excellent! Google could learn from you. When you are done with Victor’s beer I have one for you too. Thanks.

    1. Thanks Rob…. I’m glad it helped…

      Although I mainly blog about virtualization and VMware type technologies I found there was a gaping hole on this topic, and it’s something I needed to get done so I thought why not share….

      Let’s get together for those beers soon 🙂

  7. Hi, first off Thanks for this great code. It saves us all a tremendous amount of time!

    Unfortunately, I did encounter an error on this line:

    User user = dirservice.Users.Get(“email”).Execute();

    ‘Google.Apis.Auth.OAuth2.Responses.TokenResponseException:

    Error:”invalid_grant”, Description:””, Uri:””

    Any ideas as to what might be the problem?
    Thx!

    1. I’ve never ran into this but a couple of things to check..

      Certainly the service account credentials – make sure you have copied and pasted the proper account information – email needs to end in @developer.google…..

      Also, path to and correct p12 key…

      Hopefully you figure this out….

  8. Hi thanks that’s a great article. We’re adding the ability to provision Google accounts using our automation tool
    http://www.centrel-solutions.com/XIAAutomation/features.aspx

    What I don’t understand is why it’s so complicated. To create Office 365
    accounts you can just use PowerShell to logon using your Admin
    credentials none of this extra setup.

    Also I don’t understand the point of the developer console, surely if anyone creates an application for resale and the user grants access to that application they have access to all accounts in the Google domain, without needing any domain level credentials?

    Thanks!

    Dave

Leave a Reply

Your email address will not be published. Required fields are marked *