Google Admin SDK Unable to Create User - Exception 403 Forbidden

后端 未结 1 831
天命终不由人
天命终不由人 2020-12-12 02:59

I am trying to create a user using C# and the google-admin-directory_v1-rev24-csharp-1.7.0-beta client libraries however I keep geting an exception:

Google.         


        
相关标签:
1条回答
  • 2020-12-12 03:18

    It doesn't look like that your service account is impersonating any users in this call. When you want to use a service account to create a new user, you need to impersonate as the administrator account (Note: only administrator can create users).

    Take a look at this Drive example for domain wide delegation:

    https://developers.google.com/drive/delegation

    You can see that for the .net portion, it has this extra line:

    ServiceAccountUser = userEmail

    You need to create a service object authorized with the service account that will acts on behalf of the given user.

    0 讨论(0)
提交回复
热议问题