Microsoft AD Spoke : "Does group exist?" always fails if group doesn't exist

loicthery
Tera Contributor

Hello everybody,

 

We are trying to automate AD group creation using Microsoft AD Spoke V2.

Before to attemp creation, we want to check if group exists.

If group exists, the action "Does group exist?" returns "true" and stops succefully.

If group is missing, the action fails with error "Invalid group name" and flow stops in error.

 

Do you know a way to make it work?

Regards,

Loïc

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @loicthery 

what about wrapping the call "Does group exists" with a try-catch-block. That way it is not stopping the execution and you can handle the error accordingly.

Maik

View solution in original post

7 REPLIES 7

Maik Skoddow
Tera Patron
Tera Patron

Hi @loicthery 

what about wrapping the call "Does group exists" with a try-catch-block. That way it is not stopping the execution and you can handle the error accordingly.

Maik

Hi Maik,

Sorry to have made you wait.

We have use a try-catch-block as you suggested and it works.

But it's seems to be a workaround in this case...

 

Thank you for your help.

Regards,

Loïc

I agree, it does seem kind of pointless.  The point of the action is to check to see whether a group exists or not.  It should simply output a True/False or Yes/No result, and not an error if the group doesn't exist!  Kind of defeats the whole purpose of the action in the first place!

 

Out of curiosity, could you post exactly what your workaround looks like?

To get a correct behaviour, we decided to copy the action and detect the "error" message retrieved when a group already exists