{"id":121243,"date":"2020-05-12T05:54:45","date_gmt":"2020-05-12T05:54:45","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/sso-for-azure-ad\/"},"modified":"2025-08-13T08:36:25","modified_gmt":"2025-08-13T08:36:25","slug":"sso-for-azure-ad","status":"publish","type":"plugin","link":"https:\/\/ca-valencia.wordpress.org\/plugins\/sso-for-azure-ad\/","author":16472025,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.5.2","stable_tag":"trunk","tested":"6.8.5","requires":"4.7.0","requires_php":"7.0","requires_plugins":null,"header_name":"SSO for Azure AD","header_author":"Marco Benzoni","header_description":"Enable Single Sign On with Azure AD on your site.","assets_banners_color":"","last_updated":"2025-08-13 08:36:25","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/gitlab.com\/qlcvea\/wp-sso-for-azure-ad","header_author_uri":"https:\/\/qlcvea.com","rating":5,"author_block_rating":0,"active_installs":600,"downloads":12471,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"qlcvea","date":"2020-05-12 05:54:23"},"1.1.0":{"tag":"1.1.0","author":"qlcvea","date":"2021-07-02 08:06:42"},"2.0.0":{"tag":"2.0.0","author":"qlcvea","date":"2021-07-21 07:35:19"},"2.1.0":{"tag":"2.1.0","author":"qlcvea","date":"2022-08-29 15:54:00"},"2.2.0":{"tag":"2.2.0","author":"qlcvea","date":"2023-09-16 13:32:40"},"2.3.0":{"tag":"2.3.0","author":"qlcvea","date":"2023-09-24 11:44:32"},"2.4.0":{"tag":"2.4.0","author":"qlcvea","date":"2023-11-11 09:01:44"},"2.5.0":{"tag":"2.5.0","author":"qlcvea","date":"2023-12-02 10:01:37"},"2.5.1":{"tag":"2.5.1","author":"qlcvea","date":"2025-02-18 20:17:39"},"2.5.2":{"tag":"2.5.2","author":"qlcvea","date":"2025-08-13 08:36:25"}},"upgrade_notice":{"1.0.0":"<p>First release<\/p>","2.0.0":"<p><strong>Breaking change<\/strong>: The plugin now matches users based on email address and not UPN<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":4},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","2.0.0","2.1.0","2.2.0","2.3.0","2.4.0","2.5.0","2.5.1","2.5.2"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[138854,2061,2469],"plugin_category":[38],"plugin_contributors":[185638],"plugin_business_model":[],"class_list":["post-121243","plugin","type-plugin","status-publish","hentry","plugin_tags-azure-ad","plugin_tags-oauth","plugin_tags-sso","plugin_category-authentication","plugin_contributors-qlcvea","plugin_committers-qlcvea"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/sso-for-azure-ad.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin allows users to authenticate to a site with an Azure AD account using OAuth.<\/p>\n\n<p>This plugin requires an app registration in the Azure AD portal.<\/p>\n\n<p><strong>Warning<\/strong>: guest users and users created with a linked Microsoft account may lead to strange behavior. See the \"How are AD users matched to site users?\" FAQ for more information.<\/p>\n\n<p>Not affiliated with or approved by Microsoft.<\/p>\n\n<!--section=installation-->\n<p>After installing the plugin, an application must be created in Azure AD to allow for authentication.<\/p>\n\n<ol>\n<li>In the plugin's settings (Settings -&gt; SSO for Azure AD), make a note of the Redirect URL displayed in the \"Endpoints\" section.<\/li>\n<li>In the Azure AD admin panel for your directory, select \"New registration\".<\/li>\n<li>Enter a name. This will be visible to users.<br \/>\nNote: unless you know you need to change this option, leave \"Supported account types\" set to \"Accounts in this organizational directory only\".<\/li>\n<li>Under \"Redirect URI\", select \"Web\" and enter the Redirect URL that you copied earlier.<br \/>\nIf the \"URL may not contain a query string\" error appears, please see the dedicated FAQ entry for that error.<\/li>\n<li>Select \"Register\".<\/li>\n<li>Make a note of the \"Application (client ID)\" and the \"Directory (tenant) ID\".<\/li>\n<li>Select \"Certificates &amp; secrets\".<\/li>\n<li>Select \"New client secret\"<\/li>\n<li>Enter a description and select an expiration, then select \"Add\".\nNote: if you select any option other than \"Never\", do not forget to create a new client secret and change it in the plugin settings before the current one expires!<\/li>\n<li>Make a note of the client secret.<\/li>\n<li>In the plugin's settings, enter the values noted down earlier in the corresponding fields and save your changes.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='why%20is%20the%20%22login%20with%20azure%20ad%22%20button%20not%20visible%20on%20my%20site%27s%20login%20page%3F'><h3>Why is the \"Login with Azure AD\" button not visible on my site's login page?<\/h3><\/dt>\n<dd><p>The login button will not be displayed until the plugin has been fully configured.<\/p>\n\n<p>Make sure that the following options are configured and valid inside the plugin's settings (Settings -&gt; SSO for Azure AD):\n1. Application (client) ID\n2. Client secret\n3. Directory (tenant) ID<\/p><\/dd>\n<dt id='how%20are%20ad%20users%20matched%20to%20site%20users%3F'><h3>How are AD users matched to site users?<\/h3><\/dt>\n<dd><p>The plugin will look for a user whose email address is the same as their email address on Azure AD.<\/p>\n\n<p>For example, when the user who logs in to Azure AD by entering <code>user@example.com<\/code> logs in to the site, the plugin will look for a user with the email address <code>user@example.com<\/code>.<\/p>\n\n<p><strong>Warning<\/strong>: guest users and users created with a linked Microsoft account may have a different format. For example, <code>user@guestexample.com<\/code> may become <code>user_guestexample.com#EXT#@example.onmicrosoft.com<\/code>. (In some situations, the <code>#<\/code> characters may be removed.)<\/p><\/dd>\n<dt id='what%20happens%20when%20an%20ad%20user%20who%20does%20not%20have%20an%20account%20on%20the%20site%20attempts%20to%20log%20in%3F'><h3>What happens when an AD user who does not have an account on the site attempts to log in?<\/h3><\/dt>\n<dd><p>The behavior for this case is configurable.<\/p>\n\n<p>In the \"Login options\" section of the plugin's settings (Settings -&gt; SSO for Azure AD), there is an option named \"Create new users if they don't already exist\".<\/p>\n\n<p>If it is enabled, when a user logs in and the plugin cannot find the corresponding site user, a new one will be created.<br \/>\nBy default, the user will be created with the same role as new site signups. This can be changed in the \"Role for new profiles\".<\/p>\n\n<p>The plugin can also automatically fill the user's name on the new account by enabling the \"Generate user profiles automatically\" option.<\/p>\n\n<p>The plugin will set the user's username to be their email address.<br \/>\nAlternatively, the email domain can be removed (<code>user@example.com<\/code> -&gt; <code>user<\/code>) by enabling the \"Create usernames without domain name\" option.<br \/>\n<strong>Warning<\/strong>: if multiple users have the same name but different domain names (<code>user@1.example.com<\/code> and <code>user@2.example.com<\/code>) enabling this option may cause conflicts.<\/p>\n\n<p>If it is disabled, when a user logs in and the plugin cannot find the corresponding site user, the following error message will be displayed: \"Your account has not been registered on this site. Please contact your administrator.\"<\/p><\/dd>\n<dt id='how%20can%20i%20add%20the%20site%20administration%20panel%20to%20the%20azure%20application%20list%3F'><h3>How can I add the site administration panel to the Azure application list?<\/h3><\/dt>\n<dd><p>To add the site administration panel to the Azure application list, copy the \"Homepage\/Login URL\" displayed in the \"Endpoints\" section of the plugin's settings (Settings -&gt; SSO for Azure AD).<\/p>\n\n<p>This URL must be pasted in the \"Home page URL\" field in the \"Branding\" section of your app registration on the Azure AD portal.<\/p><\/dd>\n<dt id='error%20while%20setting%20up%20on%20azure%20ad%3A%20%22url%20may%20not%20contain%20a%20query%20string%22'><h3>Error while setting up on Azure AD: \"URL may not contain a query string\"<\/h3><\/dt>\n<dd><p>In some cases, Azure may reject the callback URL provided by the plugin with the error \"URL may not contain a query string\".<\/p>\n\n<p>In this case, URL rewrites are required. In the plugin settings page, enable \"Use rewrites\" and save.<\/p>\n\n<p>The callback and login\/homepage URLs listed in the plugin settings will change. These new URLs do not contain a query string and should therefore work.<\/p>\n\n<p><strong>Warning<\/strong>: if you had previously referenced the callback URL with a query string, those references must be changed to the new value displayed in the plugin settings.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<p>First release<\/p>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added support for URL rewrites<\/li>\n<li>The plugin now receives less data from Microsoft APIs (only the user's email address)<\/li>\n<li>The plugin source now contains internationalization comments<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li><strong>Breaking change<\/strong>: The plugin now matches users based on email address and not UPN<\/li>\n<li>\"Scope\" setting has been removed (the plugin now uses the Microsoft Graph API exclusively)<\/li>\n<li>Account creation can now automatically fill the user's name from their Azure AD profile<\/li>\n<li>Account creation can now create usernames without the email domain<\/li>\n<li>Other minor changes<\/li>\n<\/ul>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>The plugin will now automatically convert callback URLs to HTTPS regardless of the site's URL scheme, except if the hostname is \"localhost\" or \"127.0.0.1\".<\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>The login start endpoint now uses POST requests (GET requests will be redirected to POST with a self-submitting form)<\/li>\n<li>The button on the login page will redirect to the login start endpoint with a POST request (only if JavaScript is enabled)<\/li>\n<li>Added support for receiving login callbacks with POST requests (enable in plugin settings -&gt; \"OAuth options\" -&gt; \"Use POST callbacks\")<\/li>\n<\/ul>\n\n<h4>2.3.0<\/h4>\n\n<ul>\n<li>The SSO login button can now be hidden (<a href=\"https:\/\/gitlab.com\/qlcvea\/wp-sso-for-azure-ad\/-\/merge_requests\/5\">!5<\/a>)<\/li>\n<\/ul>\n\n<h4>2.4.0<\/h4>\n\n<ul>\n<li>Added the ability to set a different role for users created by this plugin (<a href=\"https:\/\/gitlab.com\/qlcvea\/wp-sso-for-azure-ad\/-\/merge_requests\/6\">!6<\/a>)<\/li>\n<\/ul>\n\n<h4>2.5.0<\/h4>\n\n<ul>\n<li>The requirement for login start requests to use POST is now configurable with an option (enabled by default, disable in plugin settings -&gt; \"Endpoints\" -&gt; \"Require POST to Start URL\")<\/li>\n<li>The button on the login page will only redirect to the login start endpoint with a POST request if the above option is enabled<\/li>\n<\/ul>\n\n<h4>2.5.1<\/h4>\n\n<ul>\n<li>Fixed a warning that may occur when logging in directly without a redirect URL<\/li>\n<li>Fixed the login redirect page being in Quirks Mode (<a href=\"https:\/\/gitlab.com\/qlcvea\/wp-sso-for-azure-ad\/-\/issues\/5\">#5<\/a>)<\/li>\n<\/ul>\n\n<h4>2.5.2<\/h4>\n\n<ul>\n<li>Pages managed by this plugin no longer show site content (<a href=\"https:\/\/wordpress.org\/support\/topic\/requests-to-urls-like-sso_for_azure_ad-asdasdfasdf-always-show-site-content\/\">Contributed on the plugin forum<\/a>)<\/li>\n<\/ul>","raw_excerpt":"Enable Single Sign On with Azure AD on your site.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/121243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=121243"}],"author":[{"embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/qlcvea"}],"wp:attachment":[{"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=121243"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=121243"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=121243"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=121243"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=121243"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ca-valencia.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=121243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}