Update getCredentials function

tenantName must be given outside the passwordCredentials array, otherwise it will not be accepted.