Update an existing Client VPN user with API calls in a script

kronik93
Here to help

Update an existing Client VPN user with API calls in a script

Hi, I'm trying to automate the creation of client VPN users on our network.

I want to create a new user if the user doesn't exist at all or update an existing user that had access but now doesn't and needs it back. 

My problem is that I want to get a list of all users authorized or not to cross-check in the script, using 

https://api.meraki.com/api/v1/networks/{network_id}/merakiAuthUsers only get me the users which are already authorized. I also tried to add a parameter {'includeInactive': 'True'} but that didn't do a difference.
 
I can create a user using a POST request instead of a PUT request even if the user had authorization before (this will edit the existing user with the new data in the payload), but the issue I'm having there is that the end user gets an email with the password field being blank. Using this with creating a new user completely, they get the password I'm generating for them.
 
Anyone can help me with this?
 
Thanks!
0 Replies 0
Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.