# Howto get my own user id?

**URL:** <https://devforum.zoom.us/t/howto-get-my-own-user-id/18343>\
**Category:** Windows\
**Created:** [May 19, 2020, 7:29pm UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343 "2020-05-19T19:29:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam.decrock](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sam.decrock/32/8656_2.png) [@sam.decrock](https://devforum.zoom.us/u/sam.decrock)\
**Post date:** [May 19, 2020, 7:29pm UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343/1 "2020-05-19T19:29:56Z")

</div>

Hi, I’m still deciding between using Electron or C#, but question remains the same.

Once I join the meeting, I can list all the participants. But how can I know which participant is me? Currently I’m checking the user name, but that’s not a good solution IMO.

Thanks,  
Sam

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 20, 2020, 5:31am UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343/2 "2020-05-20T05:31:02Z")

</div>

Hi Sam,

Thanks for the post. It seems like you are selecting SDKs for Windows platform. To get your own user info, it is the same for both C# wrapper and Electron SDK on Windows, use the `GetUserByUserID()` and pass 0 as the userID to get your own user info([https://zoom.github.io/zoom-sdk-windows/class\_i\_meeting\_participants\_controller.html#afa0887b5e66feb3204338a3260129989](https://zoom.github.io/zoom-sdk-windows/class_i_meeting_participants_controller.html#afa0887b5e66feb3204338a3260129989)).

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![sam.decrock](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sam.decrock/32/8656_2.png) [@sam.decrock](https://devforum.zoom.us/u/sam.decrock)\
**Post date:** [May 20, 2020, 7:59am UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343/3 "2020-05-20T07:59:29Z")

</div>

Hmm, I think I tried this on the Electron app for MacOS and that it didn’t work. Will try it with the C# SDK which I’m currently using.

---

<div class="post-metadata">

**Author:** ![sam.decrock](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sam.decrock/32/8656_2.png) [@sam.decrock](https://devforum.zoom.us/u/sam.decrock)\
**Post date:** [May 20, 2020, 7:01pm UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343/4 "2020-05-20T19:01:41Z")

</div>

Ok. It works:

```
var me = participantsController.GetUserByUserID(0);
Console.WriteLine("I am user id: " + me.GetUserID() + ", name: " + me.GetUserNameW());
Console.WriteLine("Muting myself. ");
videoController.MuteVideo();
audioController.MuteAudio(me.GetUserID(), true);

```

I think I tried muting myself with userId = 0, but that didn’t work off course:

`audioController.MuteAudio(0, true);`

---

<div class="post-metadata">

**Author:** ![bragma](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bragma/32/4213_2.png) [@bragma](https://devforum.zoom.us/u/bragma)\
**Post date:** [May 21, 2020, 7:32am UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343/5 "2020-05-21T07:32:18Z")

</div>

HI @sam.decrock,

calling GetUserByUserID(0) works, but beware of [this](https://devforum.zoom.us/t/call-to-getuserbyuserid-0-adds-a-ghost-participant-with-id-0-to-the-participants-list/17312/2).

Another option is to get the list of participant Ids and call GetUserByUserID on each, then looking for the “IsMyself” property.

---

<div class="post-metadata">

**Author:** ![sam.decrock](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sam.decrock/32/8656_2.png) [@sam.decrock](https://devforum.zoom.us/u/sam.decrock)\
**Post date:** [May 21, 2020, 10:04am UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343/6 "2020-05-21T10:04:53Z")

</div>

Thanks for the heads up. I’m skipping my own id anyway when looping over the participants list.

Using `IsMyself` is easier though, thanks @bragma !

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 22, 2020, 5:03am UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343/7 "2020-05-22T05:03:50Z")

</div>

@bragma Thanks for helping out!

Hi @sam.decrock, yes, as bragma mentioned, you may use the `isMySelf` to check whether the current information belongs to yourself:

 ![5EFF9ACB-74A0-475D-AD35-F08FEC665862](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/8/8e3f10518cc0662a6fabb7d82ef28f1c9a826b42.jpeg)

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:28pm UTC](https://devforum.zoom.us/t/howto-get-my-own-user-id/18343/8 "2020-08-21T21:28:40Z")

</div>

Closed on August 21, 2020, 9:28pm UTC


