Cannot connect to OpenFire instance host in Azure VM

I recently installed an instance od OpenFire on my Azure VM but I cannot connect to the XMPP server externally.

I have opened to endpoints in the VM manager.

I can access the admin console on port 9090 externally and can telnet into the port. But when i try to connect on port 5222 I cannot connect. I cannot telnet into that port either

Many people seem to be having similar issues. What am I doing wrong?