Summary: This plugin helps users share files stored on OneDrive in Discourse posts.
GitHub - Ahmedgagan/discourse-onedrive-picker:
Install: Follow the plugin installation guide.
Configuration (Register An Azure App)
-
Visit Microsoft Azure
-
Click
+ New registration
on the top left side of your screen. -
Fill Name of your app.
-
Select
Supported account types
Here you will get 4 options, select according to your requirements:-
Accounts in this organizational directory only (icm only - Single-tenant):
This will only allow people of your organization to sign in to the one drive picker. -
Accounts in any organizational directory (Any Azure AD directory - Multitenant):
This will only allow people of any organization to sign in to the one drive picker. No personal account user will be able to sign in to one drive picker. -
Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox):
This will allow people of any organization to sign in to the one drive picker. The personal account user will be able to sign in to one drive picker. -
Personal Microsoft accounts only
This will allow only personal accounts user to sign in to the one drive picker.
-
- Scroll down, you will get an option to add
Redirect URL
Here add yourdomain name/onedrive-picker
. eg:https:meta.discourse.com/onedrive
- Click Register, your app will be created.
- Now Copy the Application Id for your application & paste it in discourse site setting,
discourse_onedrive_azure_client_id
- After this, go to the Authentication tab on the left navigation bar & check both these options.
- Check
Access tokens (used for implicit flows)
. - Check
ID tokens (used for implicit and hybrid flows)
. - Click Save , on the left side.
- Check
- Now, go to Certificates & secrets tab on the left navigation bar and create a New client secret.
- Add Any description & select the expiry date & click Add.
You are done setting up one drive picker.
Usage Guide
- Press a cloud button in the Discourse composer to open OneDrive window.
- Select files or folders from OneDrive.
- Share links for anonymous view access are automatically generated.
- Links are inserted into the post body.
The administrator can choose whether links should be inserted raw (for one boxing) or in markdown format. One boxing doesn’t work for team SharePoint folders.
Site Settings
- discourse_onedrive_picker_azure_client_id : Add Azure Application Client ID
- discourse_onedrive_picker_use_markdown_url : Uses markdown format to insert link