SBTS STUDENT - OFFICE SIGN-IN FIX (Mac)
========================================

If your Office desktop apps (Word, Outlook, Excel, etc.) are showing the
error "AADSTS50020" or "user account does not exist in tenant" after the
recent SBTS student account migration, this script will fix it.


HOW TO RUN
----------

1. Unzip this file by double-clicking it (if you haven't already).

2. Open the unzipped folder. You should see TWO files:
     - Fix-OfficeSignIn.command   <-- the script
     - README.txt                 <-- this file

3. Double-click "Fix-OfficeSignIn.command".

4. The first time you run it, macOS may show a security warning that
   the file "cannot be opened because it is from an unidentified
   developer." If that happens:

       a. Close the warning.
       b. Right-click (or Control-click) "Fix-OfficeSignIn.command".
       c. Choose "Open" from the menu.
       d. In the new dialog, click "Open" again.

   On macOS Ventura/Sonoma/Sequoia you may instead need to go to:
       System Settings > Privacy & Security
   ...and click "Open Anyway" next to the message about Fix-OfficeSignIn.

5. A Terminal window will open. Press ENTER to start the fix.

6. The script takes about 1 minute. macOS may prompt you a few times
   to allow Keychain access -- enter your Mac LOGIN PASSWORD if asked.
   This is your normal Mac password, NOT your @students.sbts.edu password.

   IMPORTANT: when prompted, click "Always Allow" rather than just
   "Allow". This lets the script clean up every entry without
   stopping at each one.

7. The script will print "VERIFIED" at the end if everything was
   successfully cleaned. If any items remain, the log file lists them.

8. RESTART your Mac. (Apple menu > Restart)

9. After restart, open Word and sign in with your @students.sbts.edu
   address. The error should be gone.


WHAT IT DOES NOT DO
-------------------

- Does NOT touch your personal files, photos, or documents.
- Does NOT delete anything from your OneDrive cloud storage.
- Does NOT touch your Apple ID, iCloud, or non-Microsoft passwords.
- Does NOT require an administrator password.


IF IT STILL DOESN'T WORK
------------------------

A log file is saved to your Desktop in a folder called
"SBTS_OfficeFix_Logs". The log includes a verification report listing
exactly what was and wasn't removed. If the error persists after a full
restart, please reply to us with:

    1. A screenshot of the error you're seeing.
    2. The most recent file from your Desktop > SBTS_OfficeFix_Logs folder.

If you want to try the heaviest possible reset before contacting us,
download Microsoft's official Office Reset tool (made by the Office
for Mac engineering team):

    https://office-reset.com

Run the "Factory Reset" option there, restart your Mac, and try once more.

Thanks,
Campus Tech
