So Connect Microsoft 365 works in Company Settings → Quote Emails.
Instant Pricing Quote Mail.https://YOUR-HOST/microsoft-oauth-callback.html (replace with your site, e.g. survey-pricing-tool.web.app).Certificates & secrets → New client secret → copy the Value (shown once).
API permissions → Add → Microsoft Graph → Delegated:
Mail.SendUser.Readoffline_accessopenid, email, profile (often added automatically)Grant admin consent for your organization (button at top of permissions list).
In project folder (PowerShell):
firebase functions:config:set microsoft.client_id="PASTE_CLIENT_ID" microsoft.client_secret="PASTE_SECRET" microsoft.redirect_uri="https://YOUR-HOST/microsoft-oauth-callback.html"
Then: firebase deploy --only functions