# AuthCallback is not working in window console

**URL:** <https://devforum.zoom.us/t/authcallback-is-not-working-in-window-console/45133>\
**Category:** Windows\
**Created:** [March 8, 2021, 1:46pm UTC](https://devforum.zoom.us/t/authcallback-is-not-working-in-window-console/45133 "2021-03-08T13:46:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luca.cavallotti](https://avatars.discourse-cdn.com/v4/letter/l/8c91f0/32.png) [@luca.cavallotti](https://devforum.zoom.us/u/luca.cavallotti)\
**Post date:** [March 8, 2021, 1:46pm UTC](https://devforum.zoom.us/t/authcallback-is-not-working-in-window-console/45133/1 "2021-03-08T13:46:53Z")

</div>

**Description**  
Hi there!  
It seems AuthCallback is not working with console application using C# wrapper.  
OnAuthenticationReturn callback it is never fired and so the authentication process is never completed.

The problem is only with the console, instead with a web application it works correctly.

public void SdkAuthentication(string appKey, string appSecret) {  
ZOOM\_SDK\_DOTNET\_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add\_CB\_onAuthenticationReturn(OnAuthenticationReturn);  
ZOOM\_SDK\_DOTNET\_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add\_CB\_onLoginRet(OnLoginRet);  
ZOOM\_SDK\_DOTNET\_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add\_CB\_onLogout(OnLogout);

```
        ZOOM_SDK_DOTNET_WRAP.AuthParam authParam = new ZOOM_SDK_DOTNET_WRAP.AuthParam();
        authParam.appKey = appKey;
        authParam.appSecret = appSecret;

        SDKError error = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(authParam);

        if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_UNINITIALIZE == error)
        {
            throw new Exception("SDKERR_UNINITIALIZE");
        }

        if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_UNAUTHENTICATION == error)
        {
            throw new Exception("SDKERR_UNAUTHENTICATION");
        }

        _logService.Log($"ZOOM SDKAuth request result: {error}");
    }

```

private void OnAuthenticationReturn(AuthResult result)  
{  
if (ZOOM\_SDK\_DOTNET\_WRAP.AuthResult.AUTHRET\_SUCCESS == result)  
{  
\_logService.Log($“Authentication OK!”);  
}  
else//error handle.todo  
{  
throw new Exception(“Error!!”);  
}  
}

---

<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:** [March 9, 2021, 10:58pm UTC](https://devforum.zoom.us/t/authcallback-is-not-working-in-window-console/45133/2 "2021-03-09T22:58:21Z")

</div>

Hey @luca.cavallotti,

Thanks for using the dev forum!

Console applications do not handle messaging by default you would have to add it in manually. Similar to what this developer did in the Fully Customizable SDK: [joinSession Event callbacks are not fired - #11 by mtaha](https://devforum.zoom.us/t/joinsession-event-callbacks-are-not-fired/43426/11)

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:** [April 9, 2021, 8:58am UTC](https://devforum.zoom.us/t/authcallback-is-not-working-in-window-console/45133/3 "2021-04-09T08:58:56Z")

</div>

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