The first stage of removing the password is typing in 'Keychain Access' in the Search box - located in the top right of the top tool bar (the magnifying glass icon). Select this or press enter once typed-in.
Once KeyChain Access has been opened a list of app passwords should appear.
Passwords containing the words: Exchange, Microsoft Office Identities, MSOpenTech, MSProtection and ADAL need to be deleted (Right click on the entity and click delete).
Once these have been deleted, click on the ‘Passwords’ tab (situated on the left-hand side).
The ‘Passwords’ tab is shown highlighted above.
Once the 'Passwords' tab has been clicked, go to the search bar on the top right and search 'Microsoft'.
This will bring up all Microsoft passwords stored on the Mac.
An example of what this looks like is below:
Here, all the passwords that contain:
Exchange, Microsoft Office Identities, MSOpenTech, MSProtection and ADAL need to be deleted. (Right click on entry and select delete.)
DO NOT DELETE login.microsoftonline.com entry.