Back to Top

Guide for Magento 2 Azure Active Directory Login

Updated 20 May 2024

Magento 2 Azure AD Login extension allows the users having an account with Azure AD will be able to directly log in to the Magento 2 customer account using the Azure AD credentials at the Magento 2 website.

Azure AD (Azure Active Directory) is Microsoft’s cloud-based identity and access management service.

It is a directory and identity management service that provides a single sign-on (SSO) experience for users, allowing them to access multiple applications and services with a single set of login credentials.

For a fast and secure website, you can check out the Magento 2 Azure Speed and Security Optimization service. It will integrate different tools and technologies on your Azure server to make the website lightning-fast.

To get a more clear idea of the module, kindly review the video below-

Searching for an experienced
Magento 2 Company ?
Find out More
CkizPXeLg3g

Features

  • Magento 2 login using Azure AD Idp.
  • Admin can enable or disable the functionality.
  • Set the redirect URL to be used on the AD side.
  • Plugin functionality will work according to the store view.

Installation

#Download Module

Firstly, you need to log in to Webkul Store, go to My Account>My Purchased Products section, verify and then download and extract the contents of this zip folder on the system.

#Upload Folder

Once the module zip for Magento 2 Azure AD Login is extracted, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:

m2_installation

#3 Run Commands

You need to run the following commands:

composer require microsoft/microsoft-graph:^1.89.0
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush

Language Translation

For translating the module language, navigate through src/app/code/Webkul/AzureAdLogin/i18n and edit the en_US.csv file. Thereafter, rename the CSV as “en_SA.csv” and translate all right side content after the comma in the Arabic language. After editing the CSV, save it.

i18folder

Now, upload it to the path src/app/code/Webkul/AzureAdLogin/i18n where the installation of Magento 2 is on the server. The module gets translated into the Arabic Language. It supports both RTL and LTR languages.

The user can edit the CSV like the image below.

translation-1

Microsoft Azure Account Creation

To create a Microsoft account, navigate to the registration page of the same.

Magento 2 Azure AD Login create Microsoft

Here, enter the email that will be used for account creation and tap the Next button. Now, enter your password and tap the Next button to create the Microsoft Azure account.

2

After login, you can see the dashboard of Microsoft Azure as shown in the image below.

3

After registering you can see the dashboard.

4

New App Creation – Azure AD

After login into your Microsoft Azure AD account, tap on the App Registration service.

4

This brings up the section for App registrations. Tap on the New registration option.

1-1

After that, enter the name of the app and choose the Supported account types and tap the Register button after that.

1-2

Thereafter, you can see a pop-up Create application success message at the top right-hand side with app details.

1-3

Add Redirect URL

For adding the redirect URL tap on the “Add a Redirect URL” link in the image above and the below section appears.

1-4

After that, tap on the Add a platform option. This brings up the section to configure the platform. Here, choose Web.

Magento 2 Azure AD Login configure platform

Now, enter the URL redirect that you have configured in the Magento 2 extensions backend. The redirect URL will be your website URL with /azure/azure/Oauth in the end.

Example: https://example.com/azure/azure/Oauth

Magento 2 Azure AD Login configure Web settings

Generate Client Credentials for the App

For the same, tap on the “Add a certificate or secret link” as per the below snapshot.

image-57

After that, tap on the New client secret option as per the below snapshot.

Magento 2 Azure AD Login generate client secret

Now, add the name of the client’s secret and tap the add button after that.

1-7

After tapping the Add button, the client secret will get generated.

Note: It will be available only once so copy it in a safe place for use later in the extensions configuration.

Magento 2 Azure AD Login credentials for the app

New User Account Creation – Azure AD

To reach the section for creating the user, first tap on the Users service as shown below in the snapshot.

Magento 2 Azure AD Login services section

After that, tap on the New user option.

new_user-1

Now, choose to create a user manually or send an invitation to a user for registration at Azure AD.

Magento 2 Azure AD Login create user section

Create a new internal user in your organization

Enter the details for the new user and tap the create button after that.

Magento 2 Azure AD Login create user

While creating a new internal user, you need to add the email of the same user as well.

add user email

After tapping on the Create button the user will be created and using the created Username and password the user can now log in to the Magento 2 Website using the credentials.

Invite an external user to collaborate with your organization

Tap the invite User option and enter the respective details and tap the Invite button after that.

Magento 2 Azure AD Login create user by invitation

After that, the invited user gets the email to accept the invitation.

Magento 2 Azure AD Login invitation mail

After accepting the invitation, you can log in to the Azure Active Directory user dashboard.

Magento 2 Azure AD Login enter password

Tap the email code option and an OTP will be sent to that email address, enter that and tap Sign in.

You can also have an OTP-based verification method for your Magento 2 store where the OTP will be used to verify a new registration, existing user login, and password reset option.

Magento 2 Azure AD Login enter authentication code

After that, accept the agreement.

Magento 2 Azure AD Login accept terms and conditions

After that, the user can see the user dashboard of Azure Active Directory.

active-directory

Initial Configuration – Magento 2 Azure AD Login

After the successful installation of the Magento 2 Azure AD login extension, the admin will navigate through – Stores->Configuration->Webkul->Azure Login to configure the initial settings.

configuration

Here the admin will –

  • Enable or disable the Login with Azure option for the storefront.
  • Enter the Application (client) ID that you got after creating an app at the Azure AD dashboard.
  • Enter the Client’s Secret key that you got after creating an app at the Azure AD dashboard.
  • Enter the Directory (tenant) ID that you got after creating an app at the Azure AD dashboard.
  • Enter the callback URL

Note: the callback URL that you set here should be the same as the app that you create at the Azure AD dashboard and add the /azure/azure/Oauth to the end of your store URL.

E.g: https://example.com/azure/azure/Oauth

Login at Magento 2 Store – Magento 2 Azure AD Login

The registered user of the Azure AD on the Magento 2 store login page can see the button “Login Using Azure”.

Magento 2 Azure AD Login

Tapping the Login With Azure button redirects the user to the Azure AD login page. After that, the user will have to enter the password that they have set or can receive a code that can be entered to log in.

Magento 2 Azure AD Login enter Password

Enter the password and tap the Sign in button to login into the Magento 2 customer account directly.

Also, if you want a simplified registration process, providing user engagement and experience then you can check the Magento 2 Social Signup feature allowing users to log in via social platforms.

Magento 2 Azure AD Login - now login

The user is logged in to the Magento 2 customer account.

Magento 2 Azure AD Login account created

After registration, the admin can view the list of customers who have registered via Azure Ad SSO login. Now, you can also allow users to log in to the Magento 2 store using their KeyCloak SSO credentials.

customers

Support

That is all about the Magento 2 Azure AD Login. If you have any queries regarding the plugin, please contact us at Webkul Support System.

If you’re looking to create a custom e-commerce website, it’s a great idea to hire Magento developers who can help you build a powerful and scalable online store.

You can also check our complete Magento 2 extensions.

Current Product Version - 4.0.2

Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home

Table of Content