Using this Magento 2 Azure AD Login extension, 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.
- 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.
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.
Once the module zip is extracted, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:
Magento 2 Company ? Read More
#3 Run Commands
You need to run the following commands:
- composer require microsoft/microsoft-graph
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
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.
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.
Microsoft Azure Account Creation
To create a Microsoft account, navigate to the registration page of the same.
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.
After login, you can see the dashboard of Microsoft Azure as shown in the image below.
After registering you can see the dashboard.
New App Creation Azure AD
After login into your Microsoft Azure AD account, tap on the App Registration service.
This brings up the section for App registrations. Tap on the New registration option.
After that, enter the name of the app and choose the Supported account types and tap the Register button after that.
Thereafter, you can see a pop-up Create application success message at the top right-hand side with app details.
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.
After that, tap on the Add a platform option. This brings up the section to configure the platform. Here, choose Web.
Now, enter the URL redirect that you have configured in the magneto 2 extensions backend. The redirect URL will be your website URL with /azure/azure/Oauth in the end.
Generate Client Credentials for the App
For the same, tap on the “Add a certificate or secret link” as per the below snapshot.
After that, tap on the New client secret option as per the below snapshot.
Now, add the name of the client’s secret and tap the add button after that.
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.
New User Account Creation
To reach the section for creating the user, first tap on the Users service as shown below in the snapshot.
After that, tap on the New user option.
Now, choose to create a user manually or send an invitation to a user for registration at Azure AD.
Create a new internal user in your organization
Enter the details for the new user and tap the create button after that.
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.
After that, the invited user gets the email to accept the invitation.
After accepting the invitation, you can log in to the Azure Active Directory user dashboard.
Tap the email code option and an OTP will be sent to that email address, enter that and tap Sign in.
After that, accept the agreement.
After that, the user can see the user dashboard of Azure Active Directory.
Initial Configuration – Magento 2 Backend
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.
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.
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”.
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.
Enter the password and tap the Sign in button to login into the Magento 2 customer account directly.
The user is logged in to the Magento 2 customer account.
After registration, the admin can view the list of customers who have registered via Azure Ad SSO login.
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.
You can also check our complete Magento 2 extensions.
Current Product Version – 4.0.0
Supported Framework Version – Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x