To disconnect from MsGraph call a ->disconnect() method.

The disconnect will send a POST request to MsGraph to revoke the connection, in addition, the stored token will be deleted.


Typically you only want to run this is there is a connection, so it makes sense to wrap this in a ->isConnected() check:

if (MsGraph::isConnected()) {


Help support the blog so that I can continue creating new content!

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2022 DC Blog. All code MIT license. All rights reserved.