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()) {


Support my work by donating with PayPal.

Subscribe to my newsletter

Subscribe and get my books and product announcements.

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