Currently, I am working on a project to upload a file to VCSA with root account using this api “makeDirectoryInGuest”， but it is fail to connect. The root cause is my root account is expired. So I want to find a API to check if the account is expired or get root expire information( such as expire date). I find ValidateCredentialsInGuest api can be used to do authority, but it will return the same exception if the password is expired or incorrect password, and I can not distinguish them. Does anyone help to guide which api should I use to get root expired information.
Try to reset the password using the below KB and set it to 0 in administration afterwards.
Login to your VCSA and navigate to Administration to find the password expiry details and change it to 0 days to never expire.
Thanks for you information, I know where to reset it or change expire rule.
But I am using the code(script) to upload file to VCSA with root account, so before I do upload action, I should check if the root account has expired or not? If it is expired, my code should popup message like "root account is expired, please reset or change it ". So my question is that if there is an API to get expire information or validate if root is expired?
i'm not sure about any API to check something like that. As far as I know, pyvmomi can be used to create users.
Please try to login to VCSA with your current root account, it tells whether it is expired or not.