Skip to main content

Link user with Microsoft

Project description

Odoo Community Association

Microsoft account for Drive

Beta License: LGPL-3 OCA/storage Translate me on Weblate Try me on Runboat

This addon allows the user to link their Microsoft Drive account to Odoo. The stored credentials are then used by other addons to perform actions on Drive as the logged-in user.

Table of contents

Configuration

In order to use the Microsoft Drive Account module, you need to follow this process for link Odoo and Microsoft:

PART 1 : Create an Azure Application

To allow Odoo to access Microsoft OneDrive or SharePoint through the Microsoft Graph API, you must create an application in Azure Active Directory.

Step 1 – Open the Azure portal and go to Azure Active Directory, then “App registrations”, and click “New registration”.

Step 2 – Register the application. Set a name “Odoo storage integration”. Select the third option “Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)” Add a Redirect URI of type “Web”. {URL of your Odoo instance}/microsoft_account/authentication. Once the application is created, note the Application (client) ID and the Directory (tenant) ID.

Azure App dashboard

Step 3 – Generate a client secret. Go to Certificates & secrets, create a new client secret (Description : Odoo storage secret / Expires : 24month), and copy its value. You will not be able to see it again.

Secret of Azure App

Step 4 – Configure API permissions. Open API permissions, add Microsoft Graph “Application permissions”, and include Files.ReadWrite.All, and Sites.ReadWrite.All. Add also “Delegated permission” for include offline_access, openid.

IMPORTANT : Grant admin consent so the application can use these permissions.

Permissions in Azure App

PART 2 : Set Odoo System Parameters

You need your tenant_url, you can find it in your Azure portal, open Home > Dashboard. Look at the URL, it’s usually ends with onmicrosoft.com.

Tenant URL

In Odoo, open Settings > Technical > System Parameters.

Required parameters:

Optional parameter :

  • microsoft_drive_client_scope : Defines the permissions requested by Odoo. If not defined, Odoo uses the default scopes: offline_access, openid, Files.ReadWrite.All, Sites.ReadWrite.All.

PART 3 : Test the Configuration

Step 1 – In Odoo, go to your odoo profile and select “Account Security”,then click on the “grey cloud icon”.

Step 2 – You will be redirected to the Microsoft login page. Sign in and accept the requested permissions. You will then be redirected back to Odoo.

Step 3 – After authorization, Odoo should display a “blue cloud icon”. The connection is now established.

Test connexion from odoo profile

Usage

On the user preference page, the user can link their Microsoft Drive account to Odoo by cliking on the Drive button. This will redirect the user to the Microsoft authentication page, where they can log in and grant permission to Odoo to access their Drive account. Once the user has granted permission, they will be redirected back to Odoo, where their Drive account will be linked.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • ACSONE SA/NV

Contributors

Other credits

The development of this module has been financially supported by:

  • ACSONE SA/NV

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

lmignon

This module is part of the OCA/storage project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo_addon_microsoft_drive_account-18.0.2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_microsoft_drive_account-18.0.2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 19eb72b444e3f94747f26a34b7bccddc2b300b219bf90279f411254c7e5fb636
MD5 67a1695de52e5b698f8f7a6a28c8c9e3
BLAKE2b-256 e24ab6156d6a888dc78547eb7ca24829bd9396c0c1bda175fe907c4733efd323

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page