# How to add a custom onAuthenticationReturn with C++?

**URL:** <https://devforum.zoom.us/t/how-to-add-a-custom-onauthenticationreturn-with-c/55702>\
**Category:** Windows\
**Created:** [August 12, 2021, 5:27pm UTC](https://devforum.zoom.us/t/how-to-add-a-custom-onauthenticationreturn-with-c/55702 "2021-08-12T17:27:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hungnm](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hungnm/32/9731_2.png) [@hungnm](https://devforum.zoom.us/u/hungnm)\
**Post date:** [August 12, 2021, 5:27pm UTC](https://devforum.zoom.us/t/how-to-add-a-custom-onauthenticationreturn-with-c/55702/1 "2021-08-12T17:27:10Z")

</div>

**Description**  
I’m using C++ to build my app that integrate Zoom SDK. I’m using code sample in this link [https://marketplace.zoom.us/docs/sdk/native-sdks/windows/mastering-sdk/windows-sdk-functions](https://marketplace.zoom.us/docs/sdk/native-sdks/windows/mastering-sdk/windows-sdk-functions).  
But i’m still newbie with C++. When i try this code, i dont know how to assign my IAuthenService listener.  
Can someone give me an example for this. Thank you very much.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/6/f6ac053ad0cec87266e1343dc265ebd8f69f1c10.png)

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 12, 2021, 6:41pm UTC](https://devforum.zoom.us/t/how-to-add-a-custom-onauthenticationreturn-with-c/55702/2 "2021-08-12T18:41:54Z")

</div>

Hey @hungnm,

Thanks for using the dev forum!

You need to have a class inherit from IAuthServiceEvent. This class must also implement all of the functions defined in IAuthServiceEvent. Once you have that class, and you create an object out of it. You pass it into that SetEvent method.  
If you download the latest version of the video SDK, there is a demo app include. Ctrl+f for SetEvent and you should be able to find a couple different examples of this.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![hungnm](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hungnm/32/9731_2.png) [@hungnm](https://devforum.zoom.us/u/hungnm)\
**Post date:** [August 13, 2021, 11:37am UTC](https://devforum.zoom.us/t/how-to-add-a-custom-onauthenticationreturn-with-c/55702/3 "2021-08-13T11:37:40Z")

</div>

Hey @Michael_Condon,  
It worked. Thank you very much.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 13, 2021, 9:39pm UTC](https://devforum.zoom.us/t/how-to-add-a-custom-onauthenticationreturn-with-c/55702/4 "2021-08-13T21:39:05Z")

</div>

Hey @hungnm,

Awesome! I am happy to hear 🙂 please let us know if you have any other questions.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 13, 2021, 7:39am UTC](https://devforum.zoom.us/t/how-to-add-a-custom-onauthenticationreturn-with-c/55702/5 "2021-09-13T07:39:45Z")

</div>

Closed on September 13, 2021, 7:39am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
