Hybrid Windows App

I have to automate Hybrid windows app where login page is native and dashboard after login is web application.
I have tried to changing the context but that’s not working out, it says invalid method. When we tried to get source code of the dashboard using Windowsdriver it gives us login page source code. Can someone please help me to fix this.