# GetUserName not working in new meeting sdk 6.0.12

**URL:** <https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702>\
**Category:** Meeting SDK\
**Created:** [June 11, 2024, 5:05am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702 "2024-06-11T05:05:34Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 11, 2024, 5:05am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/1 "2024-06-11T05:05:34Z")

</div>

@chunsiong.zoom when i updated my sdk to 6.0.12 in meeting sdk linux  
IUserInfo\* userInfo = m\_pParticipantsController-\>GetUserByUserID(userID);  
std::cout \<\< “Code reaching here 1” \<\< std::endl;  
std::string username = userInfo-\>GetUserName(); --my code broke after this line, i.e., the logs didnt reached the second cout  
std::cout \<\< “Code reaching here 2” \<\< std::endl;

same is the issue with GetUserRole

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 11, 2024, 9:06am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/2 "2024-06-11T09:06:35Z")

</div>

@gianni.zoom also let me know how can i check sdk logs in linux

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 11, 2024, 11:27am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/3 "2024-06-11T11:27:55Z")

</div>

@chunsiong.zoom by when can i expect a response

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [June 12, 2024, 1:31am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/4 "2024-06-12T01:31:15Z")

</div>

@swatantra12singh if you need urgent support / response, please to consider signing up for a paid developer plan.

The developer forum does not have an SLA.

I’ve just tried 6.0.12 and it works fine.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/0/c0eb4c04ae590d954197d386111cb1f06a217338.png)

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/2/423264488f243f43232d84f5b0bf5e92fb9592d4.png)

Do note that GetUserName returns a zchar\_t\* datatype.

virtual const zchar\_t\* GetUserName() = 0;

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 3:33am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/5 "2024-06-12T03:33:29Z")

</div>

ok @chunsiong.zoom can you tell me how can i check sdk logs in meeting sdk for linux

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 4:44am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/6 "2024-06-12T04:44:27Z")

</div>

@chunsiong.zoom plus when i am trying to log userinfo(= m\_pParticipantsController-\>GetUserByUserID(userID)) i am getting value as 0, what could be the possible cause of it?

this is the code snippet

```auto
m_pParticipantsController = m_pMeetingService->GetMeetingParticipantsController();
	IList<unsigned int>* participants = m_pMeetingService->GetMeetingParticipantsController()->GetParticipantsList();
	printf("Participants count: %d\n", participants->GetCount());
	int count = participants->GetCount();
    for (int i = 0; i < count; ++i) {
        unsigned int userID = participants->GetItem(i);
			std::cout << "Code reaching here" << userID << std::endl;
			IUserInfo* userInfo = m_pParticipantsController->GetUserByUserID(userID);
			std::cout << "Code reaching here 1 " << userInfo << std::endl;
			 
			std::cout << "Subscribing to raw video data for UserID: " << userID << "user name " << userInfo->GetUserName() << std::endl;
    }

```

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [June 12, 2024, 5:26am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/7 "2024-06-12T05:26:33Z")

</div>

@swatantra12singh

I’m doing something like this

```auto
	//get for all users
				IList<unsigned int >* pList = getAllUserObj();
					

				

				for (int i = 0; i < pList->GetCount(); ++i) {
					unsigned int userID = pList->GetItem(i);

					// Do something with userID
					m_pParticipantsController = m_pMeetingService->GetMeetingParticipantsController();
					IUserInfo* p = m_pParticipantsController->GetUserByUserID(userID);

```

and here is the helper method

```auto
//this is a helper method to get the first User Object, it is just an arbitary User Object
IList<unsigned int >* getAllUserObj() {
	m_pParticipantsController = m_pMeetingService->GetMeetingParticipantsController();
	IList<unsigned int >* ParticipantsList = m_pParticipantsController->GetParticipantsList();
	std::cout << "Participant List is : " << ParticipantsList->GetCount() << std::endl;
	return ParticipantsList;
}

```

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 7:19am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/8 "2024-06-12T07:19:08Z")

</div>

> [@chunsiong.zoom](#):
>
> ```auto
> m_pParticipantsController = m_pMeetingService->GetMeetingParticipantsController();
> IUserInfo* p = m_pParticipantsController->GetUserByUserID(userID);
> 
> ```

Hi i tried the exact method you mentioned still my userinfo is 0 for GetMySelfUser i am getting value of 0x613e68b1ca88 but i am getting 0 for GetUserByUserID(userID) where user id is an int as well as unsigned int

@chunsiong.zoom

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [June 12, 2024, 7:22am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/9 "2024-06-12T07:22:52Z")

</div>

@swatantra12singh is the person / SDK getting the participant a HOST?

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 7:28am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/10 "2024-06-12T07:28:30Z")

</div>

@chunsiong.zoom can you rephrase the statement i am not able to get it?

i have made the sdk join both as host and as a participant

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [June 12, 2024, 7:41am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/11 "2024-06-12T07:41:19Z")

</div>

@swatantra12singh some of the methods requires you to be HOST or CO-HOST. If you do not have these privilege , the methods might throw you empty or error messages.

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 8:33am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/12 "2024-06-12T08:33:02Z")

</div>

@chunsiong.zoom But in previous versions it had no such requirements.

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 8:47am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/13 "2024-06-12T08:47:04Z")

</div>

@chunsiong.zoom if so is there any function or event that needs to be called to join the sdk bot with host privilage, i tried changing role in auth token but it didnt worked

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [June 12, 2024, 9:03am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/14 "2024-06-12T09:03:23Z")

</div>

> [@swatantra12singh](#):
>
> But in previous versions it had no such requirements.

@swatantra12singh did it only stop working in 6.0.12?

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 9:07am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/15 "2024-06-12T09:07:27Z")

</div>

@chunsiong.zoom yes the last sdk i was using was 5.17.11 and it didnt break or give such a result, if i do revert to 5.17.11 its working but then we have issue of meeting status retrieval issue i.e., the code breaks abruuptly when there is a meeting status change from waiting to start

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [June 12, 2024, 9:24am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/16 "2024-06-12T09:24:14Z")

</div>

@swatantra12singh I’ve just rebuild my entire solution, and tested on 6.0.12

GetUserID and GetUserName works without HOST privilege.

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 9:37am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/17 "2024-06-12T09:37:52Z")

</div>

@chunsiong.zoom can you share the code with me? because it am trying to impliment but i am getting error i have participant user id but GetUserByUserID is returning 0

---

<div class="post-metadata">

**Author:** ![swatantra12singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/swatantra12singh/32/58185_2.png) [@swatantra12singh](https://devforum.zoom.us/u/swatantra12singh)\
**Post date:** [June 12, 2024, 10:16am UTC](https://devforum.zoom.us/t/getusername-not-working-in-new-meeting-sdk-6-0-12/111702/18 "2024-06-12T10:16:46Z")

</div>

thanks @chunsiong.zoom i was able to solve the issue but i realised there might be underlining bug in the flow
