Click the Apple icon and select System Preferences.

Select Users & Groups, located under the System section

Select Change Password located next to your name

Once the new password has been successfully entered. Logout of the computer for a few minutes. Once you log back in your password should be updated on the Mac as well as Office 365.