Title: Setting forceAuthn=&#8221;true&#8221;
Last modified: May 24, 2021

---

# Setting forceAuthn=”true”

 *  Resolved [monoxa](https://wordpress.org/support/users/monoxa/)
 * (@monoxa)
 * [5 years ago](https://wordpress.org/support/topic/setting-forceauthntrue/)
 * I am getting “Error – AADSTS75011” in AzureAD.
 * [https://docs.microsoft.com/en-us/troubleshoot/azure/active-directory/error-code-aadsts75011-auth-method-mismatch](https://docs.microsoft.com/en-us/troubleshoot/azure/active-directory/error-code-aadsts75011-auth-method-mismatch)
 * The solution says to set “forceAuthn=”true””, but can I set this in WP SAML Auth?
 * thanks

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [5 years ago](https://wordpress.org/support/topic/setting-forceauthntrue/#post-14477018)
 * Hey [@monoxa](https://wordpress.org/support/users/monoxa/),
 * Thanks for the question. Is this for a site hosted on Pantheon?
 * It looks like OneLogin’s PHP SAML library [supports forceAuthn](https://github.com/onelogin/php-saml/blob/790a042f2d16a086a563793dab0eeb6a5a8c4e70/README.md#initiate-sso)
   but WP SAML Auth hasn’t integrated with it fully yet.
 * If you’d like to experiment, you can change this `$provider->login( $redirect_to);`
   call ([ref](https://github.com/pantheon-systems/wp-saml-auth/blob/ff8e0efd94c044b574d52f7acae2fd7403ffb6a4/inc/class-wp-saml-auth.php#L261))
   to `$provider->login( $redirect_to, array(), true );`
 * I don’t know whether this is the only change needed, or whether other changes
   are needed too.
 *  Thread Starter [monoxa](https://wordpress.org/support/users/monoxa/)
 * (@monoxa)
 * [5 years ago](https://wordpress.org/support/topic/setting-forceauthntrue/#post-14478305)
 * Thanks for the quick reply.
 * I am using Pantheon.
 * I was able to execute “forceAuthn=”true”” by rewriting the specified code.
 * Thank you very much.
 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [5 years ago](https://wordpress.org/support/topic/setting-forceauthntrue/#post-14480718)
 * Great! Glad to hear it was an easy fix.
 * I’ve just tagged WP SAML Auth v1.2.3 where you can enable forceAuthn by adding
   this filter to your `functions.php` or similar:
 *     ```
       add_filter( 'wp_saml_auth_force_authn', '__return_true' );
       ```
   
 *  Thread Starter [monoxa](https://wordpress.org/support/users/monoxa/)
 * (@monoxa)
 * [5 years ago](https://wordpress.org/support/topic/setting-forceauthntrue/#post-14483202)
 * Thank you so much for taking the time to update the plugin.
 * I then contacted the AzureAD administrator and was able to solve the “Error –
   AADSTS75011” problem by adding the code to two files.
 * ・wp-saml-auth.php（l.93）
    ・class-wp-saml-auth-options.php（l.147）
 *     ```
       'security' => array(
          'requestedAuthnContext' => false,
       )
       ```
   
 * Thank you for the best plugin.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Setting forceAuthn=”true”’ is closed to new replies.

 * ![](https://ps.w.org/wp-saml-auth/assets/icon-256x256.png?rev=3348767)
 * [WP SAML Auth](https://wordpress.org/plugins/wp-saml-auth/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-saml-auth/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-saml-auth/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-saml-auth/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-saml-auth/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-saml-auth/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [monoxa](https://wordpress.org/support/users/monoxa/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/setting-forceauthntrue/#post-14483202)
 * Status: resolved