I have created my own application in PHP that authenticates against Azure and then pulls data from Office 365 (Graph) - it works great!
When a user logs out of Office 365 I need them to be logged out of my application too.
I am using the Logout URL (within app registration) - which I believe is for this exact purpose. I can see my defined URL gets posted to as users logout, but I don't understand how I am supposed to match that to a user i.e. how do I know which user has logged out? - I can see that Azure is posting a SID field [sid] => c3db7b82-adef-43b6-b852-5955f877fbf9 but I dont understand how to match SID to anything else to work out who the user is?