x

Main chapters

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Quick start guide
  3. LimeSurvey CE - Installation
  4. How to design a good survey (Guide)
  5. Getting started
  6. LimeSurvey configuration
  7. Introduction - Surveys
  8. View survey settings
  9. View survey menu
  10. View survey structure
  11. Introduction - Questions
  12. Introduction - Question Groups
  13. Introduction - Surveys - Management
  14. Survey toolbar options
  15. Multilingual survey
  16. Quick start guide - ExpressionScript
  17. Advanced features
  18. General FAQ
  19. Troubleshooting
  20. Workarounds
  21. License
  22. Version change log
  23. Plugins - Advanced
 Actions

AzureOAuthSMTP Plugin: Difference between revisions

From LimeSurvey Manual

FeatureStarting + Category
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{FeatureStarting|6.3.0}}
== Tutorial: How to use the AzureOAuthSMTP plugin for LimeSurvey ==
== Tutorial: How to use the AzureOAuthSMTP plugin for LimeSurvey ==


Line 7: Line 9:
=== Instructions ===
=== Instructions ===


==== Set up the OAuth 2.0 Web Application in Azure Portal. ====
==== Set up the OAuth 2.0 Web Application in Azure Portal ====


# Go to the Azure Portal and sign in.
# Go to the Azure Portal and sign in.
# Click ''New'' > ''App Services'' > ''Web App''.
# Under ''Azure Services'', click on ''App Registrations''
# In the ''Basics'' tab, enter a name for your web app and select a region.
# Click ''New Registration''.
# Under ''Runtime stack'', if required, select ''Windows'' and ''PHP'' > ''7.4''.
# Enter a name for your web app and select ''Who will have access to the Application''.
# Click ''Next'' and then ''Create''.
# Click ''Register''.
 
[[File:AzureOAuthSMTP_Plugin_(5).jpeg|600px|thumb|left]]
 
==== Configure the OAuth 2.0 Web Application ====


==== Once your web app is created, go to the ''Authentication'' tab. ====
Once your web app is created, you will land on the ''Overview'' tab.


# Click ''Add a provider'' and select ''Azure Active Directory''.
# Focus on the ''Essentials'' section.
# Click ''Create'' and then ''Create a new tenant''.
# Under the section ''Client Credentials'', click ''Add a certificate or a secret'' and add a ''secret''.
# Follow the instructions to create a new tenant and Azure Active Directory application.
# Under the section ''Redirect URIs'', click ''Add the Redirect URI'', which you can copy it if from the plugin ''settings'' page.
# Once you have created the application, copy the ''Client ID'' and ''Client Secret'' values.
# Now you have created the application and you can copy ''Client ID'', ''Client Secret'' and ''Tenant Id'' values to carry over to the plugin settings.


==== Activate the AzureOAuthSMTP plugin in LimeSurvey. ====
==== Activate the AzureOAuthSMTP plugin in LimeSurvey. ====


# Go to the ''Plugins'' page in LimeSurvey.
# Go to the ''Plugins'' page in LimeSurvey and look for the AzureOAuthSMTP plugin.
# Find the AzureOAuthSMTP plugin and click ''Activate''.
# If you can't find the AzureOAuthSMTP plugin in the list of available plugins, click the 'Scan files' button, and install the plugin first.
# Click ''Activate'' to activate the plugin.


==== Configure the AzureOAuthSMTP plugin in LimeSurvey. ====
==== Configure the AzureOAuthSMTP plugin in LimeSurvey. ====


# Go to the ''Configuration'' page for the AzureOAuthSMTP plugin.
# Go to the ''Settings'' page for the AzureOAuthSMTP plugin.
 
# Please notice the ''Help'' section on the top.
[[File:AzureOAuthSMTP_Plugin_(2).jpeg|600px|thumb|left|alt text]]
 
# Enter the ''Client ID'', ''Client Secret'', and ''Tenant ID'' values that you copied from Azure Portal.
# Enter the ''Client ID'', ''Client Secret'', and ''Tenant ID'' values that you copied from Azure Portal.
# Notice the ''Tenant ID'' usually shall be set to ''consumers'', still that depends on the Azure Application.
# Click ''Save''.


[[File:AzureOAuthSMTP_Plugin_(3).jpeg|600px|thumb|left|alt text]]
[[File:AzureOAuthSMTP_Plugin_(2).jpeg|600px|thumb|center]]
 
[[File:AzureOAuthSMTP_Plugin_(3).jpeg|600px|thumb|center]]
# Click ''Save''.


==== Get a new OAuth token. ====
==== Get a new OAuth token. ====
Line 44: Line 50:
# Follow the steps in the consent screen and check the requested permissions.
# Follow the steps in the consent screen and check the requested permissions.
# Once you have granted permission, you will be redirected back to LimeSurvey.
# Once you have granted permission, you will be redirected back to LimeSurvey.
[[File:AzureOAuthSMTP_Plugin_(4).jpeg|600px|thumb|left]]


==== Test the AzureOAuthSMTP plugin. ====
==== Test the AzureOAuthSMTP plugin. ====
Line 49: Line 57:
# Go to Global Settings
# Go to Global Settings
# In the ''Email'' settings, select ''Plugin'' as the ''Email Method''.
# In the ''Email'' settings, select ''Plugin'' as the ''Email Method''.
# Scroll down and select the the ''Plugin'' that will be used for sending emails.
# Save
# Save
# Click ''Test'' to send a test email.
# Click ''Test'' to send a test email.
[[File:AzureOAuthSMTP_Plugin_(1).jpeg|600px|thumb|left]]


=== Additional notes ===
=== Additional notes ===
Line 56: Line 67:
* If you are using a self-hosted version of LimeSurvey, you will need to configure your web server to allow HTTPS traffic.
* If you are using a self-hosted version of LimeSurvey, you will need to configure your web server to allow HTTPS traffic.
* If you are using a cloud-hosted version of LimeSurvey, such as Limesurvey Cloud, you will not need to configure HTTPS traffic.
* If you are using a cloud-hosted version of LimeSurvey, such as Limesurvey Cloud, you will not need to configure HTTPS traffic.
=== References ===
Please find below some additional documentation which could be usefull:
* General OAuth Azure Process
https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth
* Environment Setup
https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
[[Category:Plugins]][[Category:Core Plugins]]

Latest revision as of 08:51, 28 June 2024

 Hint: This features is available starting in version 6.3.0


Tutorial: How to use the AzureOAuthSMTP plugin for LimeSurvey

Prerequisites

  • Access LimeSurvey over HTTPS.

Instructions

Set up the OAuth 2.0 Web Application in Azure Portal

  1. Go to the Azure Portal and sign in.
  2. Under Azure Services, click on App Registrations
  3. Click New Registration.
  4. Enter a name for your web app and select Who will have access to the Application.
  5. Click Register.

Configure the OAuth 2.0 Web Application

Once your web app is created, you will land on the Overview tab.

  1. Focus on the Essentials section.
  2. Under the section Client Credentials, click Add a certificate or a secret and add a secret.
  3. Under the section Redirect URIs, click Add the Redirect URI, which you can copy it if from the plugin settings page.
  4. Now you have created the application and you can copy Client ID, Client Secret and Tenant Id values to carry over to the plugin settings.

Activate the AzureOAuthSMTP plugin in LimeSurvey.

  1. Go to the Plugins page in LimeSurvey and look for the AzureOAuthSMTP plugin.
  2. If you can't find the AzureOAuthSMTP plugin in the list of available plugins, click the 'Scan files' button, and install the plugin first.
  3. Click Activate to activate the plugin.

Configure the AzureOAuthSMTP plugin in LimeSurvey.

  1. Go to the Settings page for the AzureOAuthSMTP plugin.
  2. Please notice the Help section on the top.
  3. Enter the Client ID, Client Secret, and Tenant ID values that you copied from Azure Portal.
  4. Notice the Tenant ID usually shall be set to consumers, still that depends on the Azure Application.
  5. Click Save.

Get a new OAuth token.

  1. At plugin's overview page, click the Get new token link to open Azure's consent screen in a new window.
  2. Follow the steps in the consent screen and check the requested permissions.
  3. Once you have granted permission, you will be redirected back to LimeSurvey.

Test the AzureOAuthSMTP plugin.

  1. Go to Global Settings
  2. In the Email settings, select Plugin as the Email Method.
  3. Scroll down and select the the Plugin that will be used for sending emails.
  4. Save
  5. Click Test to send a test email.

Additional notes

  • If you are using a self-hosted version of LimeSurvey, you will need to configure your web server to allow HTTPS traffic.
  • If you are using a cloud-hosted version of LimeSurvey, such as Limesurvey Cloud, you will not need to configure HTTPS traffic.

References

Please find below some additional documentation which could be usefull:

  • General OAuth Azure Process

https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth

  • Environment Setup

https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app