# Auth callback not working in console app

**URL:** <https://devforum.zoom.us/t/auth-callback-not-working-in-console-app/30744>\
**Category:** Meeting SDK\
**Created:** [September 19, 2020, 4:00am UTC](https://devforum.zoom.us/t/auth-callback-not-working-in-console-app/30744 "2020-09-19T04:00:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bamajap](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bamajap/32/15597_2.png) [@bamajap](https://devforum.zoom.us/u/bamajap)\
**Post date:** [September 19, 2020, 4:00am UTC](https://devforum.zoom.us/t/auth-callback-not-working-in-console-app/30744/1 "2020-09-19T04:00:19Z")

</div>

I am writing a C# app and I am attempting to automatically join a meeting when I start a console app. I am able to successfully initialize the SDK and authenticate, however, I am unable to complete the auth process for some reason. When I call the auth method, it doesn’t error out, but it also never triggers the callback method either, so it appears to do nothing. Can someone in support take a look at my code and let me know if I am missing something?

I am able to run the demo app and join a meeting perfectly fine, so I know my JWT and other credentials are good. It’s just that I cannot do this from a console app.

**Code:**

```auto
using System;
// ...
using ZOOM_SDK_DOTNET_WRAP;

namespace ZoomCliTest
{
    public class Program
    {
        private static ManualResetEvent waitHandle = new ManualResetEvent(false);
        static void Main(string[] args)
        {
            new Program().Run();
            Console.WriteLine("Cleaning up...");
            ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.CleanUp();
        }

        public void AuthReturn(AuthResult ret)
        {
            Console.WriteLine("We've been auth'd!!!");
            if (ZOOM_SDK_DOTNET_WRAP.AuthResult.AUTHRET_SUCCESS == ret)
            {
                JoinMeeting();
            }
            else
            {
                Console.WriteLine("Auth error: {0}", ret);
            }

            waitHandle.Set();
        }
        public void onLoginRet(LOGINSTATUS ret, IAccountInfo pAccountInfo)
        {
            Console.WriteLine("Logging in...");
        }
        public void onLogout()
        {
            Console.WriteLine("Logging out...");
        }

        public void Run()
        {
            var initParam = new InitParam { web_domain = "https://zoom.us",enable_log = true};
            var initErr = CZoomSDKeDotNetWrap.Instance.Initialize(initParam);
            Console.WriteLine("Init Error: {0}", initErr);

            //register callback
            CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onAuthenticationReturn(AuthReturn);
            CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLoginRet(onLoginRet);
            CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLogout(onLogout);

            var authParam = new AuthContext
            {
                jwt_token = "..."
            };
            var authErr = CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(authParam);
            Console.WriteLine("Auth status: {0}", authErr);

            var result = CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().GetAuthResult();
            Console.WriteLine("Auth result: {0}", result);

            var id = CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().GetSDKIdentity();
            Console.WriteLine(id);

            var status = CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().GetLoginStatus();
            Console.WriteLine(status);

            waitHandle.WaitOne();
        }

        private static void JoinMeeting()
        {
            // ...join a meeting
        }
    }
}

```

And the logs yield the following:

```auto
Init status: SDKERR_SUCCESS
Auth status: SDKERR_SUCCESS
Auth result: AUTHRET_NONE

LOGIN_IDLE

```

And I am running it in Release x86 mode.

---

<div class="post-metadata">

**Author:** ![dantheman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dantheman/32/40559_2.png) [@dantheman](https://devforum.zoom.us/u/dantheman)\
**Post date:** [August 17, 2022, 4:44pm UTC](https://devforum.zoom.us/t/auth-callback-not-working-in-console-app/30744/2 "2022-08-17T16:44:16Z")

</div>

I’m seeing the same thing
