If your organisation uses Microsoft 365 or Google Workspace, staff can sign in to SLightSFTP's web admin GUI and file portal with those accounts. Their passwords and multi-factor sign-in stay with Microsoft or Google, and when someone leaves, disabling their account there also stops their sign-in here.

How it works

First, under Security → Single Sign-On, note the Redirect URI. If people reach the server through a reverse proxy or a public name, enter that address as Public address of this server first, so the URI is right. Use HTTPS for anything reachable from the internet.

Microsoft Entra ID (Microsoft 365)

  1. In the Microsoft Entra admin center, go to Applications → App registrations → New registration.
  2. Name it SLightSFTP, choose Accounts in this organizational directory only, and under Redirect URI choose Web and paste the redirect URI. Click Register.
  3. Copy the Application (client) ID and the Directory (tenant) ID from the overview page.
  4. Under Certificates & secrets, create a New client secret and copy its Value.
  5. In SLightSFTP, fill in the card:
    • Issuer URL: https://login.microsoftonline.com/<Directory (tenant) ID>/v2.0
    • Client (application) ID and Client secret: the values you copied
    • Username from claim: preferred_username, which is the user's sign-in name, such as [email protected]
    • Tick Ignore the domain if the SLightSFTP user is called alice rather than [email protected].
  6. Tick Enable single sign-on, set a button label such as Sign in with Microsoft, and click Save.
The single sign-on settings filled in for Microsoft Entra ID
Security → Single Sign-On, set up for Microsoft Entra ID

Google Workspace

  1. In the Google Cloud console, open APIs & Services → OAuth consent screen and choose Internal, so only your organisation's accounts can sign in.
  2. Under Credentials → Create credentials → OAuth client ID, choose Web application and add the redirect URI under Authorized redirect URIs.
  3. Copy the client ID and client secret into SLightSFTP, with:
    • Issuer URL: https://accounts.google.com
    • Username from claim: email (only verified addresses are accepted), and tick Ignore the domain if your SLightSFTP usernames don't include it.
  4. Enable single sign-on and save.

Try it

Open the sign-in page (/login for the admin GUI, /files for the portal) in a private window. Below the password form there is now a button with your label. If a sign-in is refused, the page says why, for example that the person has no SLightSFTP account, and the attempt is in the Activity Log. See Troubleshooting for common problems such as a redirect URI mismatch.