<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python getting UserID of Guest User with merakiAuthUsers query mail address in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/python-getting-userid-of-guest-user-with-merakiauthusers-query/m-p/5450964#M7920</link>
    <description>&lt;P&gt;Perfect, Thank you so much ! &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It works great!&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 14:10:30 GMT</pubDate>
    <dc:creator>DennisWerner</dc:creator>
    <dc:date>2021-05-26T14:10:30Z</dc:date>
    <item>
      <title>Python getting UserID of Guest User with merakiAuthUsers query mail address</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-getting-userid-of-guest-user-with-merakiauthusers-query/m-p/5450962#M7918</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i am looking for a possibility to query the username of a guest account not the User ID.&lt;/P&gt;&lt;P&gt;I have the following code where i get all users, but i can not find or filter a specific User by filtering the username (mail address) maybe someone can help getting the &lt;EM&gt;&lt;STRONG&gt;meraki_auth_user_id &lt;/STRONG&gt;&lt;/EM&gt;by filtering the mail address?&lt;/P&gt;&lt;P&gt;import meraki&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;API_KEY = 'xxxxxxxxxxxxxx'&lt;BR /&gt;dashboard = meraki.DashboardAPI(API_KEY)&lt;BR /&gt;network_id = 'xxxxxxxxxxxxxxx'&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;response = dashboard.networks.getNetworkMerakiAuthUsers(&lt;BR /&gt;network_id&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;print (response)&lt;/P&gt;&lt;P&gt;As result, i need the ID of the User by searching after the mail address.&lt;/P&gt;&lt;P&gt;Thanks for any help or advise.&lt;/P&gt;&lt;P&gt;Dennis&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 12:37:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-getting-userid-of-guest-user-with-merakiauthusers-query/m-p/5450962#M7918</guid>
      <dc:creator>DennisWerner</dc:creator>
      <dc:date>2021-05-18T12:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Python getting UserID of Guest User with merakiAuthUsers query mail address</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-getting-userid-of-guest-user-with-merakiauthusers-query/m-p/5450963#M7919</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The most obvious way is to loop thru the user list:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;import meraki

API_KEY = 'xxxxxxxxxxxxxx'
dashboard = meraki.DashboardAPI(API_KEY)
network_id = 'xxxxxxxxxxxxxxx'
required_username = 'myuser@name.com'

users = dashboard.networks.getNetworkMerakiAuthUsers(
network_id
)

for user in users:
    if user["email"] == required_username:
        pprint(user)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Pythonic way would be to substitute the for loop with &lt;SPAN&gt;list comprehension&lt;/SPAN&gt;:&lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;myuser = [user for user in users if user["email"]==required_username]
pprint(myuser)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 May 2021 17:56:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-getting-userid-of-guest-user-with-merakiauthusers-query/m-p/5450963#M7919</guid>
      <dc:creator>RomanMD</dc:creator>
      <dc:date>2021-05-18T17:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python getting UserID of Guest User with merakiAuthUsers query mail address</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-getting-userid-of-guest-user-with-merakiauthusers-query/m-p/5450964#M7920</link>
      <description>&lt;P&gt;Perfect, Thank you so much ! &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It works great!&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 14:10:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-getting-userid-of-guest-user-with-merakiauthusers-query/m-p/5450964#M7920</guid>
      <dc:creator>DennisWerner</dc:creator>
      <dc:date>2021-05-26T14:10:30Z</dc:date>
    </item>
  </channel>
</rss>

