Share via


Microsoft Entra驗證工作流程

適用於:Configuration Manager (目前的分支)

本文是加入Microsoft Entra識別碼之 Windows 裝置上Configuration Manager用戶端安裝和註冊程式的技術參考。 它會詳細說明裝置驗證的工作流程程式。

注意事項

Windows 用戶端在加入Microsoft Entra租使用者時,會 (WPJ) 憑證取得工作場所加入。 如果找不到憑證,Configuration Manager用戶端就無法要求Microsoft Entra權杖。 如果沒有權杖,用戶端就無法使用Configuration Manager安全性權杖服務 (CCM_STS) 通道來Microsoft Entra月臺系統進行Configuration Manager驗證。

用戶端安裝

在此工作流程範例中,您已透過網際網路在 Windows 裝置上安裝Configuration Manager用戶端,並具有下列 ccmsetup 命令列屬性:

CCMHOSTNAME="CMG.CLOUDAPP.NET/CCM_Proxy_MutualAuth/72186325152220500" SMSSITECODE="MEM"

使用Microsoft Entra驗證的 CcmSetup 工作流程圖

1.Microsoft Entra來自 ccmsetup 的資訊要求

從網際網路安裝的用戶端需要特定的命令列屬性,才能使用Microsoft Entra驗證。 您可以在 網際網路 ccmsetup的命令列中包含這些屬性,但並非必要屬性。 當您不使用Microsoft Entra屬性時,ccmsetup 會從雲端管理閘道要求 AADCLIENTAPPIDAADRESOURCEURI 屬性, (CMG) 。 它會使用裝置的 Microsoft Entra TenantID 作為參考。 如果您尚未在 Configuration Manager 中將用戶端的 TenantID 上線,CMG 不會將必要的屬性提供給 ccmsetup 以繼續安裝用戶端。

下列專案會記錄在用戶端的 ccmsetup.log 中:

Getting AAD info from CMG 'CMG.CLOUDAPP.NET'
SMS CCM 5.0: Host=CMG.CLOUDAPP.NET, Path=/CCM_Proxy_ServerAuth/AADAuthInfo?TenantID=9aaf466a-3f40-4468-b3cd-f0010f21f05a, Port=443, Protocol=https, CcmTokenAuth=0, Flags=0x1304, Options=0xe0
Created connection on port 443
Enabled SSL revocation check.

重要事項

在 ccmsetup 期間,裝置必須驗證 CMG 伺服器驗證憑證。 CMG 伺服器驗證憑證 (CA) 憑證的根憑證授權單位必須可在用戶端上取得鏈結驗證。 如果您使用 PKI,當根 CA 未在網際網路上發佈時,請將根 CA 憑證新增至裝置的根 CA 存放區。

如果未在網際網路上發佈 CRL) (根 CA 憑證撤銷清單,請在 ccmsetup 命令列中新增 /nocrlcheck 參數。

2.Microsoft Entra權杖要求

在已加入網域的 Windows Azure AD 裝置上,ccmsetup 會使用Microsoft Entra屬性來要求呼叫 ADALOperation 提供者的Microsoft Entra權杖。 下列專案會記錄在用戶端的 ccmsetup.log 中:

Getting AAD (device) token with: ClientId = 0b7c8ab3-9ea1-4ffa-b2b9-8ffdd944bd8b, ResourceUrl = https://ConfigMgrService, AccountId = https://login.microsoftonline.com/common/oauth2/token

如果裝置權杖要求失敗,ccmsetup 會回復為嘗試要求Microsoft Entra使用者權杖。 如果裝置無法取得Microsoft Entra裝置或使用者權杖,ccmsetup 就不會繼續。

注意事項

如果裝置具有有效的 PKI 用戶端驗證憑證,ccmsetup 一律會偏好憑證。 在此情況下,用戶端會安裝為 PKI 用戶端,而不會使用Microsoft Entra驗證。

WAM token request failed. Status 5, Details 'AAD WAM extension error'
Failed to get AAD token..
Unknown error (Error: D0090016; Source: Unknown)
Failed to get AAD token for 'S-1-5-18' from WAM API. Error 0xd0090016
Falling back to get user 'S-1-5-21-1527250992-855612568-2252598708-1604' token for system...
Getting AAD (user) token with: ClientId = 0b7c8ab3-9ea1-4ffa-b2b9-8ffdd944bd8, ResourceUrl = https://ConfigMgrService, AccountId = 149FC29A-ECE3-123-A3C1-123456F035A6E
Retrieved AAD token for AAD user 'e8838041-db7a-42d5-b9ae-78813910e4cc'

3.Configuration Manager用戶端權杖要求

用戶端會使用Microsoft Entra權杖來要求Configuration Manager用戶端 (CCM) 權杖。 ccmsetup 與月臺之間的作業通訊會使用 CCM 權杖作為授權權杖 (CcmTokenAuth=1) 。

3.1 用戶端將 CCM 權杖要求傳送至 CMG

下列專案會記錄在用戶端的 ccmsetup.log 中:

Getting CCM Token from STS server 'cmg.cloudapp.net/CCM_PROXY_MutualAuth/72186325152220500'
Getting CCM Token from https://cmg.cloudapp.net/CCM_PROXY_MutualAuth/72186325152220500/CCM_STS

3.2 CMG 轉送至 CMG 連接點

下列專案會記錄在 CMG VM 實例上的 CMGService.log 中。

RequestUri: /CCM_PROXY_SERVERAUTH/72057594037937981/CCM_STS  RequestCount: 1  RequestSize: 1974 Bytes  ResponseCount: 1  ResponseSize: 1566 Bytes  AverageElapsedTime: 218 ms~~  $$<CMGService><06-24-2020 15:31:46.376+00><thread=4992 (0x1380)>

提示

Configuration Manager每隔五分鐘 CMG-<CMGname>-ProxyService_IN_<%>-CMGService.logCMGService.log同步處理至月臺伺服器記錄資料夾。

3.3 CMG 連接點會將 CMG 用戶端要求轉換為管理點用戶端要求

下列專案會記錄在裝載 CMG 連接點角色之月臺系統的 SMS_CLOUD_PROXYCONNECTOR.log (詳細資訊模式) :

SMS_CLOUD_PROXYCONNECTOR    Switched to internal URL. Replaced 'https://CMG.CLOUDAPP.NET/CCM_Proxy_MutualAuth/72186325152220500/CCM_STS' in   'https://CMG.CLOUDAPP.NET/CCM_Proxy_MutualAuth/72186325152220500/CCM_STS' with 'https://MP.MYCORP.COM/CCM_STS' and got 'https:///MP.MYCORP.COM/CCM_STS~~

3.4 管理點會驗證月臺資料庫中的使用者權杖

下列專案會記錄在裝載處理用戶端要求之管理點之月臺系統的 CCM_STS.log 中:

ProcessRequest - Start
Incoming request URL: https://MP.MYCORP.COM/CCM_STS
Validated AAD token. TokenType: UDA TenantId: 2ca9a796-a1a6-43ec-88f1-5935b32155c5 UserId: e8838041-db7a-42d5-b9ae-78813910e4cc DeviceId: 8d2b4ff9-0172-4998-9851-b5324303385f OnPrem_UserSid: S-1-5-21-1527250992-855612568-2252598708-1604 OnPrem_DeviceSid:  
TokenType is UDA
Created SCCM token, token type: UDA, hierarchyId: 8ed3174b-e814-41b5-b51c-fb368f0d4003, userId: 23bbbba2-702e-4db4-8fd9-3b4fe3a5175d, deviceId: GUID:13E80CEF-5698-4C63-9ED6-E58FBFF78C38
Issued token
Return token to client

4.內容位置要求

一旦用戶端取得 CCM 權杖,它會快取並使用它來要求網站資訊和 ccmsetup.cab 的內容位置。 一旦裝置下載用戶端內容,就會開始安裝。 下列專案會記錄在用戶端的 ccmsetup.log 中:

Cached encrypted token for 'S-1-5-18'. Will expire at '06/25/2020 08:29:35'
ccmsetup: Host=CMG.cloudapp.net, Path=/CCM_Proxy_ServerAuth7981/ccm_system_tokenauth/request, Port=443, Protocol=https, CcmTokenAuth=1, Flags=0x4100, Options=0xe0
Created connection on port 443
Sending location request to 'cmg.cloudapp.net/CCM_PROXY_MutualAuth/72186325152220500' with payload '< Request >
Appending CCM Token to the header.
Received message '<SiteInfoReply SchemaVersion="1.00">  < reply > </SiteInfoReply>'
     ...
Checking the URL 'https://CMG.cloudapp.net/CCM_PROXY_MutualAuth/72186325152220500/CCM_Client/ccmsetup.cab
ccmsetup: Host=CMG.cloudapp.net, Path=/CCM_Proxy_ServerAuth/72057594037937995/CCM_Client
Appending CCM Token to the header.
Found a valid online MP 'https://CMG.cloudapp.net/CCM_PROXY_MutualAuth/72186325152220500
Searching for DP locations from MP(s)...
CCMSETUP bootstrap from Internet: 1
Sending message body '<ContentLocationRequest SchemaVersion="1.00"  BGRVersion="1"> ...
The location 'https://CMG.cloudapp.net/downloadrestservice.svc/getcontentxmlsecure?pid=CS100001&cid=CS100001
     ...
Installing version 5.00.8968.1000 of the client with product code {66653948-0717-4D50-B0B9-ED66FDED2DDB}
Running installation package
Package:     C:\WINDOWS\ccmsetup\{E6F27809-FF66-4BAA-B0FB-E4A154A6A388}\client.msi

注意事項

如果用戶端從啟用內容的 CMG 找到內容,ccmsetup 會從雲端儲存體下載內容。 如果雲端上無法使用最新的用戶端版本,它會透過 CMG 要求從管理點下載內容。

用戶端註冊

使用Microsoft Entra驗證進行用戶端註冊的工作流程圖

1.Configuration Manager用戶端要求註冊

一旦 ccmsetup 成功安裝Configuration Manager用戶端,註冊就會初始化。 下列專案會記錄在用戶端的 ClientIDManagerStartup.log 中:

AADJoinStatusTask: Client hasn't been registered yet.
RegEndPoint: Event notification: CCM_RemoteClient_Reassigned
RegEndPoint: Received notification for site assignment change from '<none>' to 'MEM'.
     ...
[RegTask] - Starting registration, attempt 1.
[RegTask] - Client is not registered. Sending registration request for GUID:C66EE0FD-08E7-4B38-B282-7E6954B71139 ...
Registering client using AAD auth.

2.Configuration Manager要求Microsoft Entra權杖以註冊用戶端

用戶端會要求新的Microsoft Entra權杖,以使用Microsoft Entra驗證進行註冊。 它偏好裝置權杖,但如果無法使用,用戶端會回復為要求Microsoft Entra使用者權杖。 下列專案會記錄在用戶端的 ADALOperationProvider.log 中:

Getting AAD (user) token with: ClientId = 0b7c8ab3-9ea1-4ffa-b2b9-8ffdd944bd8, ResourceUrl = https://ConfigMgrService, AccountId = 9756a359-f76a-47d5-8662-9a837012fc35
Retrieved AAD token for AAD user 'e8838041-db7a-42d5-b9ae-78813910e4cc'

3.註冊要求

管理點上的註冊元件會處理用戶端註冊程式。 用戶端會將註冊訊息傳送至 MP_ClientRegistration 端點。

3.1 CMG 會將用戶端註冊要求轉送至管理點

下列專案會記錄在裝載處理用戶端要求之管理點之月臺系統的 MP_RegistrationManager.log 中:

Registering device using AAD auth: DeviceId='8d2b4ff9-0172-4998-9851-b5324303385f ', TenantId='c8c82542-203c-4df9-9d86-cdd4dae67e0a'
Processing Registration request from Client 'GUID:C66EE0FD-08E7-4B38-B282-7E6954B71139'

3.2 Configuration Manager用戶端已註冊

如果註冊成功,用戶端會收到以核准 3註冊Microsoft Entra識別碼型註冊的確認訊息。 下列專案會記錄在用戶端的 ClientIDManagerStartup.log 中:

[RegTask] - Client is registered. Server assigned ClientID is GUID:C66EE0FD-08E7-4B38-B282-7E6954B71139. Approval status 3

4.Configuration Manager用戶端權杖要求

一旦伺服器確認用戶端註冊,用戶端就會處理回復訊息。 用戶端接著會要求並快取新的 CCM 權杖。 下列專案會記錄在用戶端的 ClientIDManagerStartup.log 中:

Getting CCM Token from STS server 'MP.MYCORP.COM'
Getting CCM Token from https://MP.MYCORP.COM/CCM_STS
     ...
Cached encrypted token for 'S-1-5-18'. Will expire at '08/12/2020 18:55:40'

4.1 CMG 取得並轉送CCM_Token要求至 CMG 連接點

下列專案會記錄在 CMG VM 的 CMGService.log 和裝載 CMG 連接點角色的月臺系統中:

RequestUri: /CCM_PROXY_SERVERAUTH/72057594037937981/CCM_STS  RequestCount: 769  RequestSize: 1081595 Bytes  ResponseCount: 769     ResponseSize: 36143 Bytes  AverageElapsedTime: 3945 ms

4.2 CMG 連接點會將 CMG 用戶端要求轉換為管理點用戶端要求

下列專案會記錄在裝載 CMG 連接點角色之月臺系統的 SMS_CLOUD_PROXYCONNECTOR.log 中:

MessageID: 3087bd34-b82c-4950-b972-e82bb0fb8385 RequestURI: https://MP.MYCORP.COM/CCM_STS EndpointName: CCM_STS ResponseHeader: HTTP/1.1 200 OK ~~ ResponseBodySize: 0 ElapsedTime: 2 ms

4.3 管理點會驗證月臺資料庫中的使用者權杖

下列專案會記錄在裝載處理用戶端要求之管理點之月臺系統的 CCM_STS.log 中:

ProcessRequest - Start
Incoming request URL: https://MP.MYCORP.COM/CCM_STS
Validated AAD token. TokenType: UDA TenantId: 2ca9a796-a1a6-43ec-88f1-5935b32155c5 UserId: e8838041-db7a-42d5-b9ae-78813910e4cc DeviceId: 8d2b4ff9-0172-4998-9851-b5324303385f OnPrem_UserSid: S-1-5-21-1527250992-855612568-2252598708-1604 OnPrem_DeviceSid:  
TokenType is UDA
Created SCCM token, token type: UDA, hierarchyId: 8ed3174b-e814-41b5-b51c-fb368f0d4003, userId: 23bbbba2-702e-4db4-8fd9-3b4fe3a5175d, deviceId: GUID:13E80CEF-5698-4C63-9ED6-E58FBFF78C38
Issued token
Return token to client

伺服器會將 CCM 權杖傳回給用戶端,以進行其餘的用戶端對月臺通訊。

注意事項

在用戶端註冊期間,憑證驗證一律會執行。 即使您使用Microsoft Entra驗證方法來註冊用戶端,也會發生此程式。 此行為是後援選項,以防Microsoft Entra驗證失敗。

CCM 權杖更新

CCM 權杖的存留期為八小時。 當用戶端偵測到 CCM 權杖已過期或即將到期時,它會傳送新的 CCM 權杖要求。 CcmMessaging 元件會處理此更新程式。 下列專案會記錄在用戶端的 CcmMessaging.log 中:

Sending remote sync message '{BD03DEED-D09A-4E63-ADAD-596376FFB0DA}' to host 'CMG.CLOUDAPP.NET/CCM_Proxy_MutualAuth/72186325152220500' endpoint 'MP_PolicyManager'. Flags 0x280, sender account S-1-5-21-1721254763-462695806-1538882281-3289177
    ...
CCM Token for 'S-1-5-8-1721254763-462695806-1538882281-3289177' (12/23/2019 21:47:24) is already expired or close to expire
Getting CCM Token from https://CMG.CLOUDAPP.NET/CCM_Proxy_ServerAuth/72186325152220500/CCM_STS
Cached encrypted token for 'S-1-5-21-1721254763-462695806-1538882281-3289177'. Will expire at '01/10/2020 17:14:54'
    ...
ccmhttp: Host=CMG.CLOUDAPP.NET, Path=/CCM_Proxy_ServerAuth/72186325152220500/ccm_system_tokenauth/request, Port=443, Protocol=https, CcmTokenAuth=1, Flags=0x4200, Options=0x1e0
Target URL scheme is HTTPS: https://CMG.CLOUDAPP.NET/CCM_Proxy_ServerAuth/72186325152220500/ccm_system_tokenauth/request
Appending CCM Token to the header.
     ...
Message '{BD03DEED-D09A-4E63-ADAD-596376FFB0DA}' got reply message '{36EE3A78-8F6E-425F-BF5C-8460E8E56C33}' to endpoint 'dummy'

常見問題

  • 根 CA 不存在:用戶端需要根 CA 憑證來驗證 CMG 伺服器驗證憑證。

  • CRL 檢查已啟用:在網際網路上發佈 CRL。 或者,使用 /NoCRLCheck ccmsetup 的 參數。 您也可以停用下列選項:用戶端會 檢查月臺系統之 CRL) (憑證撤銷清單。 在網站屬性的 [ 通訊安全 性] 索引標籤上尋找此設定。

  • 找不到 WPJ 憑證:請確定裝置已Microsoft Entra加入。 使用 dsregcmd.exe。 例如, dsregcmd /status 並查看 [ 裝置狀態] 區 段。

提示

透過 CMG、CMG 連接點和管理點的用戶端通訊會透過 HTTPS 執行。 如果您為月臺設定增強式 HTTP,您仍然可以設定 HTTP 的管理點。

  • 用戶端會驗證 CMG 伺服器驗證憑證:

    • PKI 憑證:用戶端需要其本機存放區中 CMG 憑證的根 CA。
    • 協力廠商憑證:用戶端會使用其在網際網路上發佈的根 CA 自動驗證憑證。
  • CMG、CMG 連接點和管理點會驗證MICROSOFT ENTRA識別碼和 CCM 權杖。

  • CMG 連接點和管理點之間的通訊也會在兩端受到保護:

    • CMG 連接點會使用用戶端驗證憑證。
    • MP 會使用 PKI 憑證進行 HTTPS 設定,或使用自我簽署憑證來增強 HTTP。