Connect WordPress and Microsoft Entra | Azure | 365

Export a configuration

The recommended workflow to transfer the Identity Provider (IdP) portion of the WPO365 from the website’s database to its wp-config.php file, involves the following steps.

  • First ensure that you have a working WPO365 configuration, for example one that enable your website’s users to sign in with OpenID Connect or SAML 2.0.
  • Then export the IdP portion of that configuration, using the export function on the plugin’s Import / export page.
  • Optionally, then update the exported configuration.
  • Finally, add the exported configuration portion to your website’s wp-config.php file, for example using an FTP client.

To export the IdP portion of the WPO365 configuration, proceeds as follows.

  • Navigate to WP Admin > WPO365 > … > Import \ export.
  • Scroll down to Export configuration (wp-config.php | WPO_AAD_1) and click the button Export configuration.
  • After you clicked the button Export configuration a link will appear immediately below the button to Download parseable AAD options. Click the link to download the file wpo365-parseable-aad-options.txt, save if locally on your computer and open it in your favorite text editor.
array (
  'app_only_application_id' => '',
  'app_only_application_secret' => '',
  'application_id' => 'e737dc1f-0949-4587-911a-------------',
  'application_secret' => 'ySh...',
  'default' => false,
  'id' => '65eed664caef6',
  'mail_application_id' => 'e737dc1f-0949-4587-911a-------------',
  'mail_application_secret' => 'ySh...',
  'mail_redirect_url' => 'https://www.wpo365connect.com/',
  'mail_tenant_id' => '9be34e84-6f85-4365-9a48-------------',
  'redirect_url' => 'https://www.wpo365connect.com/',
  'saml_base_url' => 'https://www.wpo365connect.com/',
  'saml_idp_entity_id' => '',
  'saml_idp_meta_data_url' => '',
  'saml_idp_sls_binding' => '',
  'saml_idp_sls_url' => '',
  'saml_idp_ssos_binding' => '',
  'saml_idp_ssos_url' => '',
  'saml_sp_acs_binding' => '',
  'saml_sp_acs_url' => '',
  'saml_sp_entity_id' => '',
  'saml_sp_sls_binding' => '',
  'saml_sp_sls_url' => '',
  'saml_x509_cert' => '',
  'tenant_id' => '9be34e84-6f85-4365-9a48-------------',
  'title' => 'Title for IdP 65eed664caef6',
  'type' => 'oidc',
)

The file that you downloaded, contains all the necessary internal variables that WPO365 needs, to configure its Single Sign-on for a single IdP and its (optional) feature to send WordPress emails using Microsoft Graph.


Important You should not change the variable names, add or remove variables. You can, however, change values of variables, if you need to apply changes and if you made sure that the variable in question is indeed the correct one. Last but not least should you make sure that after your changes, the PHP array of variables is still parseable, or else your website will report a critical error and no longer be available, once you add this configuration to your site’s wp-config.php file.


The following variables deserve your special attention.

  • id This identifies the IdP and makes it unique within the WPO365 configuration. The value that is exported has been created when you exported the configuration and you can change it to a more readable id. However, you should not change it, once you applied the configuration to your website.
  • title The title of the IdP is only used when you configure multiple IdPs and can safely be left to its default value in case of a single IdP configuration.
  • default Whether an IdP is the default IdP or not, only matters when you configure multiple IdPs can safely be left set to false in case of a single IdP configuration.
  • type Defines the single sign-on protocol that should be used for this IdP. Allowed values are either oidc or saml).

Related Features