疑難排解租用戶附加和裝置動作

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

Configuration Manager 用戶端可以同步至系統管理中心 Microsoft Intune。 某些客戶端動作可以從已同步處理用戶端的 Microsoft Intune 系統管理中心執行。

可用的動作如下:

  • 同步處理電腦原則
  • 同步處理使用者原則
  • 應用程式評估週期

Microsoft Intune 系統管理中心的裝置概觀

當系統管理員從系統管理中心 Microsoft Intune 執行動作時,通知要求會轉送到 Configuration Manager 網站,以及從網站轉送到用戶端。

記錄檔

使用位於服務連接點上的下列記錄檔:

  • CMGatewaySyncUploadWorker.log
  • CMGatewayNotificationWorker.log

使用位於管理點上的下列記錄檔:

  • BgbServer.log

使用位於用戶端上的下列記錄檔:

  • CcmNotificationAgent.log

檢閱您的上傳

  1. 從 <ConfigMgr install directory>\Logs 開啟 CMGatewaySyncUploadWorker.log
  2. 下一個同步時間會以類似於 Next run time will be at approximately: 02/28/2020 16:35:31 的記錄檔項目來表示。
  3. 針對裝置上傳,尋找類似於 Batching N records 的記錄檔項目。 N 是自上次上傳以來所上傳的已變更裝置數目。
  4. 每隔 15 分鐘就會上傳一次,以進行變更。 上傳變更之後,可能需要5到10分鐘的時間,客戶端變更才會出現在系統管理中心 Microsoft Intune

Configuration Manager 元件和記錄流程

  • SMS_SERVICE_CONNECTOR:使用閘道通知背景工作角色從 Microsoft Intune 系統管理中心處理通知。
  • SMS_NOTIFICATION_SERVER:取得通知以及建立用戶端通知。
  • BgbAgent:用戶端取得工作並執行要求的動作。

SMS_SERVICE_CONNECTOR

從 Microsoft Intune 系統管理中心起始動作時,CMGatewayNotificationWorker.log 會處理要求。

Received new notification. Validating basic notification details...
Validating device action message content...
Authorized to perform client action. TemplateID: RequestMachinePolicy TenantId: a1b2c3a1-b2c3-d4a1-b2c3-d4a1b2c3a1b2 AADUserID:     a1b2c3a1-b2c3-d4a1-b2c3-d4a1b2c3a1b2
Forwarded BGB remote task. TemplateID: 1 TaskGuid: a43dd1b3-a006-4604-b012-5529380b3b6f TaskParam: TargetDeviceIDs: 1  
  1. 系統管理中心 Microsoft Intune 收到通知。

    Received new notification. Validating basic notification details..
    
  2. 使用者和裝置動作會經過驗證。

    Validating device action message content... 
    Authorized to perform client action. TemplateID: RequestMachinePolicy TenantId: a1b2c3a1-b2c3-d4a1-b2c3-d4a1b2c3a1b2 AADUserID:     a1b2c3a1-b2c3-d4a1-b2c3-d4a1b2c3a1b2
    
  3. 遠端工作會轉送至 SMS_NOTIFICATION_SERVER。

    Forwarded BGB remote task. TemplateID: 1 TaskGuid: a43dd1b3-a006-4604-b012-5529380b3b6f TaskParam: TargetDeviceIDs: 1  
    

SMS_NOTIFICATION_SERVER

訊息傳送至 SMS_NOTIFICATION_SERVER 後,系統會將工作從管理點傳送至對應的用戶端。 您將在 BgbServer (位於管理點) 上看到下列項目:

Get one push message from database.
Starting to send push task (PushID: 7 TaskID: 8 TaskGUID: A43DD1B3-A006-4604-B012-5529380B3B6F TaskType: 1 TaskParam: ) to 1 clients  with throttling (strategy: 1 param: 42)

BgbAgent

最後一個步驟會在用戶端上進行,並可在 CcmNotificationAgent.log 中看到。 收到工作之後,它將會要求排程者執行動作。 執行動作時,您會看到確認訊息:

Receive task from server with pushid=7, taskid=8, taskguid=A43DD1B3-A006-4604-B012-5529380B3B6F, tasktype=1 and taskParam=

Send Task response message <BgbResponseMessage TimeStamp="2020-01-21T15:43:43Z"><PushID>8</PushID><TaskID>9</TaskID><ReturnCode>1</ReturnCode></BgbResponseMessage> successfully.

常見問題

未獲授權,無法執行用戶端動作

如果系統管理員在 Configuration Manager 中沒有所需的權限,您將在 CMGatewayNotificationWorker.log 中看到一個 Unauthorized 回應。

Received new notification. Validating basic notification details..
Validating device action message content...
Unauthorized to perform client action. TemplateID: RequestMachinePolicy TenantId: a1b2c3a1-b2c3-d4a1-b2c3-d4a1b2c3a1b2 AADUserID: 3a1e89e6-e190-4615-9d38-a208b0eb1c78

請確定從 Microsoft Intune 系統管理中心執行動作的使用者具有 Configuration Manager 網站的必要許可權。 如需詳細資訊,請參閱 Microsoft Intune 租使用者附加必要條件

已知問題

資料同步處理失敗

如果您在 Microsoft Intune 系統管理中心檢視租使用者附加詳細數據時發生問題,可能是因為階層上線設定發生問題。 此問題可能是由於上架已上架的階層所造成。

您也可以從 GenericUploadWorker.logCMGatewayNotificationWorker.log 檔案中的項目,偵測到此問題。 如需詳細資訊,請參閱需要重設租用戶附加設定的記錄檔中的範例錯誤

資料同步處理失敗的因應措施

若要重設租用戶附加設定:

  1. 將階層下架。 如需詳細資訊,請參閱從租用戶附加下架

  2. 請至少等候兩小時,讓服務清除現有的記錄。

  3. 將階層重新上架。 如需詳細資訊,請參閱啟用租用戶附加

需要重設租用戶附加設定的記錄檔中的範例錯誤

GenericUploadWorker.log 中的 AccountOnboardingInfo 和 DevicePost 要求錯誤
[OnboardScenario] Creating web request to: https://us.gateway.configmgr.manage.microsoft.com/api/gateway/AccountOnboardingInfo Method: POST Activity ID: ed2186a0-fb43-4cf1-84df-9283dd45a461 Timeout: 00:02:00
[OnboardScenario] Response from https://us.gateway.configmgr.manage.microsoft.com/api/gateway/AccountOnboardingInfo is: 400 (Bad Request)
Response status code: 400 (BadRequest) Activity ID: a579728b-eca0-4144-80ac-eea25ee5bcf6
Unexpected exception for worker GenericUploadWorker
Exception details:
[Critical][GenericUploadWorker][0][System.Net.WebException][0x80131509]
The remote server returned an error: (400) Bad Request.    at Microsoft.ConfigurationManager.ServiceConnector.ExtensionMethods.<GetResponseAsync>d__13.MoveNext()

[UploadDelta_HelpdeskUpload] Response from https://us.gateway.configmgr.manage.microsoft.com/api/gateway/DevicePost is: 401 (Unauthorized)
Response status code: 401 (Unauthorized) Activity ID: 6daac983-5f94-464e-b1bd-9b634a051d1d
[WebException]: Failed to upload data to 'https://us.gateway.configmgr.manage.microsoft.com/api/gateway/DevicePost'
Exception details:
[Warning][GenericUploadWorker][0][System.Net.WebException][0x80131509]
The remote server returned an error: (401) Unauthorized.    at Microsoft.ConfigurationManager.ServiceConnector.ExtensionMethods.<GetResponseAsync>d__13.MoveNext()
CMGatewayNotificationWorker.log 中的裝置動作錯誤
[GetNotifications] Response from https://us.gateway.configmgr.manage.microsoft.com/api/gateway/Notification is: 401 (Unauthorized)
Response status code: 401 (Unauthorized) Activity ID: 4c536a72-fd7f-4d08-948a-3e65d2129e44
Web exception when getting new notification
Exception details:
[Warning][CMGatewayNotificationWorker][0][System.Net.WebException][0x80131509]
The remote server returned an error: (401) Unauthorized.    at Microsoft.ConfigurationManager.ServiceConnector.ExtensionMethods.<GetResponseAsync>d__13.MoveNext()
Response in the web exception: {"Message":"An error has occurred."}

特定裝置未同步處理

特定裝置 (也就是 Configuration Manager 用戶端) 可能不會上傳至服務。

受影響的裝置:如果裝置是對發佈點功能及其用戶端代理程式使用相同 PKI 憑證的發佈點,則該裝置將不會包含在租用戶附加裝置同步處理中。

行為:在上架階段執行租用戶附加時,第一次會執行完整的同步處理。 後續的同步處理週期為差異同步處理。 對受影響裝置的任何更新都會導致裝置從同步處理中移除。

當 Configuration Manager 網站設定為需要多重要素驗證時,大部分的租使用者附加功能都無法運作

場景:如果與服務連接點通訊SMS 提供者電腦設定為使用多重要素驗證,您就無法安裝應用程式、執行 CMPivot 查詢,以及從管理控制台執行其他動作。 您收到錯誤碼 403,禁止。

解決方案:目前的因應措施是將內部部署階層設定為預設的驗證層級 Windows 驗證。 如需詳細資訊,請參閱 SMS提供者一文中的驗證一節

後續步驟