Skip to content

Instantly share code, notes, and snippets.

@orgcontrib
Last active July 6, 2024 17:41
Show Gist options
  • Save orgcontrib/daeafb78dcbed17d7f43b7182fd5c8f8 to your computer and use it in GitHub Desktop.
Save orgcontrib/daeafb78dcbed17d7f43b7182fd5c8f8 to your computer and use it in GitHub Desktop.
gnome-m365

Foreword (context) video.

Microsoft 365

Custom Client ID

To setup a custom client ID, you must register a new application with Microsoft and enable the appropriate permissions.

  1. Sign up and/or login to Microsoft Entra
  2. In the sidebar select "Identity" → "Applications" → "App registrations"
  3. In the tab bar select "New registration"
  4. Choose a name for the application and select "Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)". Leave the "Redirect URI" empty and click "Register"
  5. Copy the "Application (client) ID" and then click "Add a Redirect URI"
  6. Select "Add a platform" and then "Mobile and desktop applications"
  7. Under "Custom Redirect URIs" add goa-oauth2://localhost/<client-id>, then click "Configure"
  8. Select "API permissions" in the application sidebar, then "Add a permission" in the tab bar
  9. Select "Microsoft Graph" and "Delegated Permissions", then add the following permissions:
    • offline_access
    • contacts.readwrite
    • files.readwrite
    • files.readwrite.all
    • mail.readwrite
    • sites.read.all
    • sites.readwrite.all
    • user.read
  10. Click on "Add permissions" to complete the process
    Credit: @andyholmes for the wiki.
    Unfortunately, M$ is about profit not ❤️ for Linux.
@orgcontrib
Copy link
Author

You cannot login to Admin Center with a personal account.

@orgcontrib
Copy link
Author

orgcontrib commented Jul 5, 2024

OK, I was a bit harsh with my strikethrough remark. That limitation may apply if you want to register your own app.

@orgcontrib
Copy link
Author

orgcontrib commented Jul 5, 2024

The real issue is the counterintuitive UX with the dialog that pops up when the user selects Microsoft 365 in GNOME's Online Accounts. You don't need all those steps if what you're up to is simply getting access to your OneDrive files via GVfs backend (same as with Google). Here's WHAT YOU NEED TO DO: leave both fields empty (Client/Tenant ID) and hit the Sign in... You'll login as usual with your personal MSFT account credentials (email and password).

@orgcontrib
Copy link
Author

orgcontrib commented Jul 5, 2024

For the curious ones, here is where I hit the SPO license wall (when user clicks the related entry in GNOME Files aka Nautilus - it triggers an activation event, resulting in GVs trying to automount user's OneDrive).

@orgcontrib
Copy link
Author

I made a screencast (mute) video that should be published shortly.

@orgcontrib
Copy link
Author

UPDATE: work in progress. Follow 319.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment