cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5804
Views
0
Helpful
7
Replies

how to get user ids from meraki

R0g3r
Community Member

Hello everyone

We are using meraki wifi with guest user via splash login. I want to delete these users when they are expired.

I used this documentation: https://developer.cisco.com/meraki/api-v1

I found this method to delete them:

https://developer.cisco.com/meraki/api-v1/#!delete-a-user-and-all-of-its-authentication-methods

My problem is I don't know how to get the userid. There is no GET for users as far as I can see.

There is only the method "merakiAuthUsers" where I get an ID, and the ID is just base64 hashed "email,accountType".

TLDR: How can I get the user id to delete it with "deleteOrganizationUser"?

Thank you very much

R0g3r

1 Accepted Solution

Accepted Solutions

R0g3r
Community Member

I asked the support and this is not possible at the moment.

With this method you can only delete organizations admin:

https://developer.cisco.com/meraki/api-v1/#!delete-a-user-and-all-of-its-authentication-methods

Unfortunatly, for meraki auth user there is only a deauthorize method, but no delete method.

View solution in original post

7 Replies 7

Thank you for your fast response. Unfortunatly, that is not working. As an example I run this command:

https://developer.cisco.com/meraki/api-v1/#!list-the-users-configured-under-meraki-authentication-for-a-network-splash-guest-or-radius-users-for-a-wireless-network-or-client-vpn-users-for-a-wired-network

with this output:

[
    {
        "id": "aGlAaGkuY29t",
        "email": "miles@meraki.com",
        "name": "Miles Meraki",
        "createdAt": "2018-02-11T00:00:00.090210Z",
        "accountType": "Guest",
        "isAdmin": false,
        "authorizations": [
            {
                "ssidNumber": 1,
                "authorizedZone": "Store WiFi",
                "expiresAt": "2018-03-13T00:00:00.090210Z",
                "authorizedByName": "Miles Meraki",
                "authorizedByEmail": "miles@meraki.com"
            }
        ]
    }
]

Next step is I take this Id and run this:

https://api.meraki.com/api/v1/organizations/<organizationId>/users/aGlAaGkuY29t
Then I receive: "The remote server returned an error: (404) Not Found."
Therefore I believe I don't get the correct ID or this is the merakiAuthUserID but no the userId needed for deleteOrganizationUsers.
Kind regards
R0g3r

Pmeza
Community Member

are you talking about client ids? like the client ids Meraki assigns to each user?

for example:

client_ids = ['k123456', 'k789abc', 'kabcde1', 'k01abcde']

R0g3r
Community Member

Probably not, but I would try it netherless 🙂

How do I get the client_id for a user?

Pmeza
Community Member

This endpoint:
https://developer.cisco.com/meraki/api-v1/get-network-clients/

will show all unique ids that have used a network during a specific timespan. Once you get the ids, put them in a 'list' and you can use them with other endpoints.

R0g3r
Community Member

This give me the clients, but I need the user. I guess the support is right, there is no way at the moment. Netherless, thank you very much.

R0g3r
Community Member

I asked the support and this is not possible at the moment.

With this method you can only delete organizations admin:

https://developer.cisco.com/meraki/api-v1/#!delete-a-user-and-all-of-its-authentication-methods

Unfortunatly, for meraki auth user there is only a deauthorize method, but no delete method.