Lab Microsoft 365 – Module 14 Prepare for Identity Synchronization

Nếu bạn hiện có on-premises directory, chẳng hạn như Active Directory, thì bạn có thể tích hợp nó với Azure Active Directory bằng cách đồng bộ hóa danh tính của bạn từ on-premises directory với Microsoft 365 bằng công cụ đồng bộ như Azure AD Connect

Trước khi đồng bộ on-premises Active Directory với Azure AD, bạn phải chuẩn bị môi trường của mình bằng cách dùng Microsoft 365 IdFix tool để phân tích.

Prepare for Identity Synchronization

Bài lab hướng dẫn bạn dùng IdFix tool để kiểm tra, phân tích, và fix lỗi on-premises Active Directory trước khi thực hiện đồng bộ với Azure Active Directory dùng Azure AD Connect.

Task 1 – Cấu Hình UPN

Task 1 - Cấu Hình UPN

1. Tại máy Domain controller, vào Run gõ lệnh cmd enter, rồi thực hiện lệnh sau để tạo OU HCM (thay nhatnghe và local bằng tên domain của bạn)

Dsadd ou ou=hcm,dc=nhatnghe,dc=local

2. Tiếp tục thực hiện lệnh sau để tạo user trong Ou HCM (thay nhatnghe và local bằng tên domain của bạn)

for /l %a in (1,1,5) do dsadd user cn=u%a,ou=hcm,dc=nhatnghe,dc=local -pwd 1234567890?a -upn u%a@nhatnghe.local

UPN

3. Vào run gõ lệnh DSA.MSC để kiểm tra OU và user vừa tạo

UPN

4. Vào Server Manager, tại Server Manager chọn Tool, chọn Active Directory Domains and Trusts

UPN

5. Tại của sổ Active Directory Domains and Trusts, phải chuột vào Active Directory Domains and Trusts, chọn Properties.

UPN

6. Tại màn hình UPN Suffixes, trong phần Alternative UPN suffixes: nhập vào nhatnghe.us (tên miền của bạn đã add vào ở Module 1), ấn Add, OK

UPN

  • 7. Vào Start, phải chuột vào Windows PowerShell, chọn Run as administrator
  • 8. Tại Windows PowerShell thực hiện lệnh sau để đổi tất cả các user trong AD từ User@nhatnghe.local sang user@nhatnghe.us
  • Get-ADUser -Filter * -Properties SamAccountName | foreach { Set-ADUser $_ -UserPrincipalName ($_.SamAccountName + “@nhatnghe.us” )}
  • 9. Vào Run gõ lệnh DSA.MSC, phải chuột vào user u1 chọn properties, chọn tab Account, kiểm tra xem đã chuyển sang @nhatnghe.us

UPN

Task 2: Giả lập lỗi cho user accounts

Task 2: Giả lập lỗi cho user accounts

1. Vào Windows PowerShell thực hiện lệnh sau, gõ Y và enter

Set-ExecutionPolicy Unrestricted

2. Thực thi file sau để tạo lỗi cho user account (file này ở thư mục Allfiles)

.\CreateProblemUsers.ps1

3. Sau khi thực thi xong vào DSA.MSC, phải chuột vào user u1 chọn properties, chọn tab Account. Kiểm tra thấy User logon name có thêm @, ấn Cancel

user accounts

4. Phải chuột vào user u2 chọn properties, chọn tab General. Kiểm tra thấy Email là u2@nhatnghe.us

user accounts

5. Phải chuột vào user u3 chọn properties, chọn tab General. Kiểm tra thấy Email cũng là u2@nhatnghe.us

user accounts

6. Phải chuột vào user u4 chọn properties, chọn tab General. Kiểm tra thấy Email là u4 @nhatnghe.us (có khoảng trắng trong email)

user accounts

7. Phải chuột vào u5 chọn properties, chọn tab General. Kiểm tra không có Email

Task 3: Sử Dụng IdFix Tool Tìm và Sửa Lỗi User Account

Task 3: Sử Dụng IdFix Tool Tìm và Sửa Lỗi User Account

1. Tại máy domain controller, vào trình duyệt truy cập vào trang https://microsoft.github.io/idfix/

2. Tại trang Microsoft – IdFix, menu trái chọn Step 2: Install IdFix, chọn Setup.exe và download file.

IdFix Tool

3. Sau khi download xong, vào folder Downloads, thực thi file setup.exe

4. Của sổ User Account Control nhập vào Administrator và Password, ấn Yes

5. Cửa sổ IdFix Privacy Statement ấn OK

IdFix Tool

6. Chọn tab Query, sẽ thấy các user bị lỗi

7. Tại cột ERROR sẽ thấy lý do bị lỗi

8. Tại cột ACTION sửa lại tất cả thành EDIT

9. Trên Toolbar ấn Apply

IdFix Tool

10. Cửa sổ Apply Pending, Ấn Yes

IdFix Tool

11. Cột ACTION đã đổi sang COMPLETE, và quan sát cột UPDATE thấy U1 và U4 đã được thay đổi

IdFix Tool

12. Vào File Explorer, trong folder IdFix, phải chuột vào file Verbose <date> <time>.txt chọn Open with, chọn Notepad.

IdFix Tool

13. Xem các thay đổi ghi trong file log, đóng file.

IdFix Tool

14. Trở về IdFix tool, chọn Query.

15. Cột UPDATE sửa email cho u3 thành u3@nhatnghe.us

16. Cột UPDATE thêm email cho u5 là u5@nhatnghe.us

17. Cột Action của các user sửa thành EDIT, chọn Apply.

IdFix Tool

18. Cửa sổ Apply Pending, Ấn Yes.

19. Trở về Query, không thấy lỗi nào nữa. Vào DSA.MSC kiểm tra email của các user đã chỉnh sữa xong.

Task 4: Download Azure AD Connect

Task 4: Download Azure AD Connect

1. Tại máy domain vào trình duyệt truy cập vào trang https://admin.microsoft.com

2. Đăng nhập vào bằng user têncủabạn@customdomain.

3. Cũng tại trình duyệt, mở một tab mới vào trang  https://www.microsoft.com/en-us/download/details.aspx?id=47594

4. Tại trang download Microsoft Azure Active Directory Connect ấn Download.

Azure AD Connect

Task 5. Cài Azure AD Connect và Thực Hiện Full Synchronization 

Task 5. Cài Azure AD Connect và Thực Hiện Full Synchronization
  1. Sau khi download xong, phải chuột vào file AzureADConnect ấn Install

(Nếu báo lỗi TLS vào PowerShell thực hiện lệnh sau:

  • Import-module -Name “C:\Program Files\Microsoft Azure Active Directory Connect\Tools\AdSyncTools”
  • Set-ADSyncToolsTls12 -Enabled $true )

2. Cửa sổ Security Warning ấn Run, tiến hành cài Azure AD Connect

3. Tại màn hình Welcome to the Microsoft Azure AD Connect Setup Wizard  ấn Next

4. Tại màn hình Welcome, chọn I agree to the license terms and privacy notice, ấn Continue.

Full Synchronization

5. Tại màn hình Express Settings, chọn Use express settings

6. Màn hình Connect to Azure AD nhập vào têncủabạn@customdomain và nhập password ấn Next.

7. Màn hình Connect to AD DS nhập vào nhatnghe\Administrator (domain admin của bạn) và password ấn Next.

8. Màn hình Azure AD sign-in configuration check chọn Continue without matching all UPN suffixes to verified domains ấn Next.

9.  Màn hình Ready to configure, check vào Start the synchronization process when configuration completes ấn Install.

10. Chờ Install xong ấn Exit

11. Kiểm tra trên màn hình desktp có Icon Azure AD Connect

12. Trở lại trang Microsoft 365 admin center, Kiểm tra các user đã được đồng bộ lên Azure AD

Full Synchronization

Hoàn tất bài lab

Lab Office 365 Module 15