Barba76
Barba76
I don't know if it helps but you can try to override de onDispose method. As far I remember, this method is triggered on the webPart on partial-page navigation
This issue happened to me, also. I just can't get anything from Graph on Teams Desktop environment (web app works fine). I also get "Cannot read property 'indexOf' of undefined"....
@lucabandMSFT : Yes, everything works as expected on the web app. I've checked on Azure portal and I don't have any client secrets or certificates. 
not working for me yet. This time I am getting another error: "**Cannot read property 'match' of undefined**"
@joselarios Now, I am getting exactly the same error as you
Same here. It works on workbench but not on a real page