We've recently replaced an in-house application using Google depreciated APIs with GAM version 4.31 to change our user passwords. The first thing we discovered was GAM 3.x through GAM 4.31 does not use many exit codes (except for 0 and 2) that our application can use to determine the error that occurred. So we wrote DOS batch that can be called by our vbscript. This batch
- redirects stdout to a file and stderr to GamResults.err.
- The output is parsed for "Error" 1
- the following error # is used with "exit /b {error#}" to set the errorlevel
I was able to anticipate the following 4 error conditions.
- 0 "Successful"
- 2 GAM Syntax Error"
- 404 'Resource Not Found
- 1301 'User Does Not Exist
We are getting several Error# 412 every day and I don't know what this means as I am unable to repeat the error and can't find a list of errors that is returned by GAM.
Is it possible to post the errorlevels returned by GAM? Also, when will the exit codes be added back to GAM? This method of redirecting output to set an exit code is cumbersome.