I've been experiencing the same problem, when I contacted Microsoft they said it was an easy fix from Mojang, if they would just reset the game server attached to the account. However when I contacted Mojang they simply said to fix my settings (despite the fact I told them that was not the issue) and then upvote this bug report.
Here is the conversation I had with the person at Microsoft, who assured me everything would be fixed if the game server was refreshed.
[media][media][media]
The issue seemed to be resolved in the latest update. The 'join realm' button appeared, and I just had to reset my settings again and then restart Minecraft. I have not tested it with a realm code yet, but it has the option to enter one now