Microsoft 365 sign-in¶
Microsoft 365 is the group of Microsoft services we use every day: Teams chats, Outlook mail, the calendar, OneDrive files, SharePoint sites and Teams meeting transcripts. sfe reads all of them through Microsoft Graph, Microsoft's programming interface, with one sign-in that we make once with sfe teams login. It only reads: nothing is sent, moved, answered or marked as read, and no file is uploaded or changed.
Video, about one and a half minutes, with narration and captions.
The video shows sfe's own checks for this sign-in, from a real run. The browser part of a sign-in, where we type our password and approve it, is ours alone, so the video describes it and does not record it.
What it is used for in sfe¶
| Command group | What it reads |
|---|---|
sfe teams |
Our recent chats and their messages, the teams we belong to, their channels and posts |
sfe mail |
Outlook folders, messages and conversations. Reading leaves a message unread |
sfe calendar |
The events in a window of time, and one event with who was invited |
sfe files |
Our OneDrive and the files shared with us: list, search, show, download |
sfe sites |
SharePoint sites: their document libraries, the rows of a list, a page as text |
sfe meetings |
Which Teams meetings left a transcript or a recording, and the transcript |
Mail and the calendar are our own. We read them when we need to, and a coding agent reads them only when the task needs it.
What must be signed in¶
| What | Detail |
|---|---|
| The command | sfe teams login. It opens the Microsoft sign-in in our browser. The result goes into the macOS Keychain |
| What we type | Our password and MFA in the browser. We type them, never sfe and never an agent |
| If the browser step does not work | sfe teams login --device signs in with a code that we type on another page, instead of a browser redirect |
| More access, when we want it | sfe teams login --shared-files also asks to read the files shared in chats, and --channels also asks to read teams and channels |
| Which app we sign in through | Microsoft's own command-line app, unless the configuration names an app that WGU IT registered |
One sign-in serves all six groups. Each group has its own switch, so sfe env disable mail turns mail off without touching the others.
Environments¶
There is one tenant, wgu.edu, and it is production. sfe marks every Microsoft row [PRODUCTION].
What a successful sign-in looks like¶
sfe status has a teams row that shows our name, and a row for each of the other five groups that says same sign-in as teams:
teams yes - Microsoft Graph [PRODUCTION] <our name>
mail yes - Microsoft Graph [PRODUCTION] same sign-in as teams
sfe doctor teams shows a green tick for Microsoft sign-in for teams, mail, calendar, files, sites, meetings (kept in the Keychain). sfe teams whoami says which Microsoft account sfe reads as. Both only read.
On a Mac where it is signed in, sfe doctor teams looks like this:

And sfe help teams login, which only reads:

Steps¶
- We run
sfe doctor teams. If we are not signed in, it printssfe teams login. - We run
sfe teams login. The browser opens on the Microsoft sign-in. - We choose our WGU account, and type our password and approve the MFA ourselves.
- When the browser says the sign-in is done, we close the tab and go back to the terminal.
- We run
sfe teams whoami, and thensfe doctor teams.
Troubleshooting¶
| What we see | Likely cause | What to do |
|---|---|---|
not signed in to Microsoft, with sign in once with: sfe teams login, or exit code 4 |
The sign-in is missing, or has been removed | Run sfe teams login ourselves |
The sign-in was not given, so sfe is not signed in in the browser tab |
The sign-in was cancelled or refused in the browser | Close the tab, and run sfe teams login again. The terminal says what to do next |
| The browser does not come forward, or the redirect fails | The browser step is blocked on this Mac | Run sfe teams login --device, and type the code it shows on the page it names |
| A command that reads files, channels or teams says access is missing | We signed in without the extra access | Run sfe teams login --shared-files or sfe teams login --channels |
| One of the six groups should be off | We do not want sfe to read it | Run sfe env disable <group>, for example sfe env disable mail |
Next¶
Last reviewed: 2026-12-02