Phonsie Hevey1
Tera Expert
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 03-05-2021 11:39 PM
While working on an integration with Meraki I realised that the merakiAuthUserId which is required for the getNetworkMerakiAuthUser API call is just the base64Encoded string of email,accountType
So as an example
var email = "test.meraki2@gmail.com";
var account_type = "Guest";
var user_id_unencoded = email + "," + account_type;
var user_id = GlideStringUtil.base64Encode(user_id_unencoded);
gs.log(user_id);
gs.log("dGVzdC5tZXJha2kyQGdtYWlsLmNvbSxHdWVzdA");
According to Meraki support there's is no method for searching for a particular user just knowing their email address. So finding or updating a user client-side is problematic if there's 1000's of users in a given network. But with the above the merakiAuthUserId can be easily generated and the user details can be retrieved or updated using getNetworkMerakiAuthUser or updateNetworkMerakiAuthUser as long as you know the account type in advance.