Hey team, apologies for the very specific question. What values does userId accept in the Gsuit...


Badge +1

Hey team, apologies for the very specific question. What values does userId accept in the Gsuite Move User to Org Unit action? I’ve been using an email address there, but that seems to be causing some issues where deactivated Gsuite users have the same email address as active users (or aliases). Is there some more unique value I could use on this call?



🗨 Link to Slack thread

22 replies

Badge +1

To be clear, I’m using the https://api.bettercloud.com/api/v1/actions/de41a0c6-5afa-11e5-885d-feff819cdc9f/execute endpoint

Userlevel 2
Badge +5

In BetterCloud UI, I believe it references a unique BC userID that ties across all integrations. So if you’re trying to script it, you’ll need to do a lookup by email to fetch the ID before you can populate it.

Userlevel 2
Badge +5

Don’t quote me on that though. It may also be a known conflict from reusing a user’s email address. (Stop doing that, probably)

Userlevel 5
Badge +2

@gillenb this particular action should accept an email address. RE: the conflict, I don’t think it’s possible to have a deactivated user with the same email address as an active user, but I could be wrong. Would you mind providing an example or showing the error you are receiving? Thanks

Badge +1

Thanks @mikestone-bettercloud I’m not sure what exactly went wrong, but once I have a concrete example I can share it. In the interim does that action accept any other value? I’ve tried BC uid in the past, but it seems like user email is the only option

Userlevel 5
Badge +2

I believe that action should accept a UserId and an Org Unit

Userlevel 5
Badge +2

but I’ll need to double check

Badge +1

Thanks @mikestone-bettercloud. What’s the best way to query for that UserID value?

Userlevel 5
Badge +2

oh that should just be the email address

Badge +1

Ah okay so that’s my original question - will that action accept value for UserID other than email address? Is there another type of ID accepted?

Badge +1

Sounds like the answer is no

Userlevel 5
Badge +2

errr I don’t believe so. I’ll need to double check. @jb.lovell / @richard-bc do you happen to know?

Badge +2

Hey @mikestone-bettercloud thanks for the tag! I’ve reached out to our dev team for a list of the supported input parameters

Badge +1

Thanks @mikestone-bettercloud and @richard-bc

Userlevel 2
Badge +2

Here are the action details:

Userlevel 2
Badge +2


Userlevel 2
Badge +2

Yea, that userId should accept an email

Userlevel 2
Badge +2

will that action accept value for UserID other than email address?

Technically, it should accept the Google userId. The one that is unique to the Google API

Userlevel 2
Badge +2

But that’s typically a little difficult to find

Badge +1

Ah! That’s good to know @jb.lovell. So if I can get the Google userID from our Gsuite intance I can safely pass that to BC in this API call?

Userlevel 2
Badge +2

Yes, sir! Should be!

Badge +1

Great. Thanks for that

Reply