I have implemented authentication against microsoft in my application. I have the following code:
Note that for scopes I have tried adding openid and profile but the same thing happens
Once it runs the acquireTokenSilent(), the authResult contains an accessToken that doesn't look right, and it's causing problems when using it to contact the graph api. This is what authResult looks like:
If you look closely this is what access token looks like:
EwBgA8l6BAAUO9chh8cJscQLmU LSWpbnr0vmwwAAR1aq2Mea9vF5dtLZLzQ/aPmRbx24QJ5pg8OLpfcRYDTx6CNZR5zNdBHsJ2PTbz Ypu1635Ur9wMA zmHhICnMt00QfA3hWgrLQXOYXXjt0xdzRRoxbjs6/jBLFvMcMdDPAt6yENfDaw9PQkdFp NNTjDYm5djScvBoMGS1K2ghFwWjFwa eRm5Zb17aMwopVWHs/cvF8T3/7A l/qbPi/BEGvVa8IZbAbVUpVPkml9gfW1lJ5rE6c2mNEEJWgg9YGeETQV4LjfVK/byr7oCdsbwSLua5Uwvo5jN9VFuuSs5x5QonJJmgpB3EfNnobUBLxYKm6HbuiE6t9LnDJJ2ESMDZgAACI46be98pNPrMALOOeGW2vSOp7qfeDPiy6R72fXzeBxnDRpe/pLyEWPZHDmQtjs6AhhqnYBQ1bLEoXoxPDmAKbGrH9yINhgx/WNscrPnnc5tPcgq0DvJXae50BPVzGvrlPW8bauEjMPFJBZL/TF07wmFIi7ppaxxSaXBmFiNBkD3/gxrjvXzbQdg/vUkOwyPRHF6HkX4N88y1CfE546SYx834nqzWQS9a6D3zMCSbrlBfw8BKVkbluJ0kI979lKiKd21rUZFCN781Qy4rmGHO5R91iKvshglPN4KV1LXNT3H2iHLgePxiWs HhBN1diWeMMcIe3cO4BFRetJF9s00/v6ENP1rZC 7CXTK8EV3av1 3QGBgCfPmMUfBjoAn/RsGQ6WzKty2N78buK4jOaF0VOKnR/XXsxAdZMO0LAyfcpYqOciHE05vzu7eDW7G0VCucGodpwF35ugKXAwW8sg1IIm3qQ4961k4PWRUoA3ah 6gwuzB9nDACvpoGmWRHGxjkO YUecSDuLeH3J3m FNsOJhsn wwKLtG4BsWyBb/4Oo7n798 a7W5USbowesk3 TsMLUrSobnbZTnIcu3gee2nSg6A8PQCPRR/Xx0 ItJM4LZXqMQNGK gMe5eD9rcXuRYI2yZFBBNEC1C6e/pzv3sfTaf4LkP8O2JYAQ9s0f46yvsPv35fwyZDMciNHBUpoGDSw2Ux9kWuNBnMWSdAjBu8ZWhkLFX4to PmsC
When, according to microsoft it should look more or less like:
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Imk2bEdrM0ZaenhSY1ViMkMzbkVRN3N5SEpsWSIsImtpZCI6Imk2bEdrM0ZaenhSY1ViMkMzbkVRN3N5SEpsWSJ9
This is happening when using personal outlook accounts. When I'm testing using my company account, it's working
You cannot decode an MSA token, they're not a JWT. Since Outlook comes under a personal account it is not similar to JWT. Similar kind of issue please refer