{"abstract":[{"text":"Trigger enhanced log collection on the device.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/com.apple.documentation\/documentation\/technologies","doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement"]]},"identifier":{"interfaceLanguage":"data","url":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/Trigger-Enhanced-Log-Collection-Command"},"kind":"symbol","legalNotices":{"copyright":"Copyright &copy; 2026 Apple Inc. All rights reserved.","privacyPolicy":"https:\/\/www.apple.com\/privacy\/privacy-policy","termsOfUse":"https:\/\/www.apple.com\/legal\/internet-services\/terms\/site.html"},"metadata":{"availableLanguages":["de-DE","en-US","es-419","fr-FR","it-IT","ja-JP","ko-KR","pt-BR","zh-CN"],"externalID":"rest:put:mdm#TriggerEnhancedLogCollectionCommand","modules":[{"name":"Device Management"}],"navigatorTitle":[{"kind":"text","text":"Trigger Enhanced Log Collection"}],"platforms":[{"introducedAt":"27.0","name":"iOS"},{"introducedAt":"27.0","name":"iPadOS"},{"introducedAt":"27.0","name":"Mac Catalyst"},{"introducedAt":"27.0","name":"macOS"},{"introducedAt":"27.0","name":"tvOS"}],"role":"symbol","roleHeading":"Web Service Endpoint","symbolKind":"httpRequest","title":"Trigger Enhanced Log Collection"},"primaryContentSections":[{"kind":"restEndpoint","title":"URL","tokens":[{"kind":"method","text":"PUT"},{"kind":"text","text":" "},{"kind":"baseURL","text":"https:\/\/yourmdmhost.example.com\/"},{"kind":"path","text":"mdm"}]},{"bodyContentType":[{"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/TriggerEnhancedLogCollectionCommand","kind":"typeIdentifier","preciseIdentifier":"mdm-commands:TriggerEnhancedLogCollectionCommand","text":"TriggerEnhancedLogCollectionCommand"}],"content":[{"inlineContent":[{"text":"The request object the server returns for the Trigger Enhanced Log Collection Command.","type":"text"}],"type":"paragraph"}],"kind":"restBody","mimeType":"application\/x-apple-aspen-mdm","parameters":[],"title":"HTTP Body"},{"items":[{"content":[{"inlineContent":[{"text":"The response object the system returns for the Trigger Enhanced Log Collection Command.","type":"text"}],"type":"paragraph"}],"mimeType":"application\/xml","reason":"OK","status":200,"type":[{"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/TriggerEnhancedLogCollectionResponse","kind":"typeIdentifier","preciseIdentifier":"mdm-commands:TriggerEnhancedLogCollectionResponse","text":"TriggerEnhancedLogCollectionResponse"}]}],"kind":"restResponses","title":"Response Codes"},{"content":[{"anchor":"Discussion","level":2,"text":"Discussion","type":"heading"},{"inlineContent":[{"text":"When the organization’s IT support reports a problem to AppleCare, AppleCare may request that the device runs enhanced log collection. AppleCare provides a token to IT support, and they send the ","type":"text"},{"code":"TriggerEnhancedLogCollection","type":"codeVoice"},{"text":" command to the device, with the token, to initiate the enhanced log collection procedure.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"When the device processes the command it starts the enhanced log collection operation. There are two modes:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"code":"interactive","type":"codeVoice"},{"text":": the device shows the user a notification that allows the user to initiate the enhanced log collection. The device prompts the user to consent to both log collection and log upload at the appropriate times. The user can decline to proceed with enhanced log collection or upload. This mode is required for macOS devices. This mode isn’t available on tvOS devices or Shared iPad.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"code":"non-interactive","type":"codeVoice"},{"text":": the device shows a notification that enhanced log collection is in progress. The device collects and uploads the logs in the background without any user intervention. This mode is always available for tvOS devices and Shared iPad. This mode is only available for iOS devices when all these conditions are met:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"There’s no passcode on the device.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"There are no accounts on the device. For example, iCloud, App Store, mail, calendar, or contacts accounts.","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"}]}],"type":"unorderedList"},{"inlineContent":[{"text":"AppleCare, in conjunction with IT support, determines the mode and the token encodes the mode.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"You can cancel an active enhanced log collection session by sending the ","type":"text"},{"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/Cancel-Enhanced-Log-Collection-Command","isActive":true,"type":"reference"},{"text":" to the device.","type":"text"}],"type":"paragraph"},{"anchor":"Declarative-status","level":3,"text":"Declarative status","type":"heading"},{"inlineContent":[{"text":"The enhanced log collection process reports declarative status to the device management service using the following status items:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"code":"enhanced-logging.status","type":"codeVoice"},{"text":": Reports the device’s enhanced log collection session state. See ","type":"text"},{"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/StatusEnhancedLoggingStatus","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"code":"enhanced-logging.applecare-token","type":"codeVoice"},{"text":": Reports the device’s enhanced log collection session AppleCare token. See ","type":"text"},{"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/StatusEnhancedLoggingAppleCareToken","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"code":"enhanced-logging.timestamp","type":"codeVoice"},{"text":": Reports the device’s enhanced log collection session timestamp. See ","type":"text"},{"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/StatusEnhancedLoggingTimestamp","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"},{"anchor":"Tokens-for-testing","level":3,"text":"Tokens for testing","type":"heading"},{"inlineContent":[{"text":"You can use a set of test tokens to verify correct operation of your device management service product. The set of tokens are:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"code":"test-token-normal","type":"codeVoice"},{"text":": This token activates an interactive enhanced log collection session that results in the device reporting the ","type":"text"},{"code":"finished","type":"codeVoice"},{"text":" declarative state if all parts of the flow succeed. Any failure, cancellation, or decline, result in the device reporting the corresponding state.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"code":"test-token-normal-headless","type":"codeVoice"},{"text":": This token activates a non-interactive enhanced log collection session that results in the device reporting the ","type":"text"},{"code":"finished","type":"codeVoice"},{"text":" declarative state if all parts of the flow succeed. Any failure, cancellation, or decline, result in the device reporting the corresponding state.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"code":"test-token-failed","type":"codeVoice"},{"text":": This token activates an interactive enhanced log collection session that results in the device reporting the ","type":"text"},{"code":"failed","type":"codeVoice"},{"text":" declarative state if all parts of the flow succeed. Any failure, cancellation, or decline, result in the device reporting the corresponding state.","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"},{"anchor":"Command-availability","level":3,"text":"Command availability","type":"heading"},{"extendedData":{"0_0":{"colspan":0,"rowspan":1},"0_1":{"colspan":0,"rowspan":1}},"header":"row","rows":[[[{"inlineContent":[],"type":"paragraph"}],[{"inlineContent":[],"type":"paragraph"}]],[[{"inlineContent":[{"text":"Device channel","type":"text"}],"type":"paragraph"}],[{"inlineContent":[{"text":"iOS, Shared iPad, tvOS","type":"text"}],"type":"paragraph"}]],[[{"inlineContent":[{"text":"User channel","type":"text"}],"type":"paragraph"}],[{"inlineContent":[{"text":"macOS","type":"text"}],"type":"paragraph"}]],[[{"inlineContent":[{"text":"Requires supervision","type":"text"}],"type":"paragraph"}],[{"inlineContent":[{"text":"iOS, macOS, tvOS","type":"text"}],"type":"paragraph"}]],[[{"inlineContent":[{"text":"Allowed in user enrollment","type":"text"}],"type":"paragraph"}],[{"inlineContent":[{"text":"N\/A","type":"text"}],"type":"paragraph"}]],[[{"inlineContent":[{"text":"Required access right","type":"text"}],"type":"paragraph"}],[{"inlineContent":[{"text":"N\/A","type":"text"}],"type":"paragraph"}]]],"type":"table"}],"kind":"content"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"seeAlsoSections":[{"anchor":"Enhanced-logging","generated":true,"identifiers":["doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/Cancel-Enhanced-Log-Collection-Command"],"title":"Enhanced logging"}],"topicSections":[{"anchor":"Commands-and-responses","identifiers":["doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/TriggerEnhancedLogCollectionCommand","doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/TriggerEnhancedLogCollectionResponse"],"title":"Commands and responses"}],"variants":[{"paths":["\/documentation\/devicemanagement\/trigger-enhanced-log-collection-command"],"traits":[{"interfaceLanguage":"data"}]}],"references":{"doc://com.apple.devicemanagement/documentation/DeviceManagement":{"abstract":[{"text":"Manage your organization’s devices remotely.","type":"text"}],"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement","kind":"symbol","navigatorTitle":[{"kind":"text","text":"Device Management"}],"role":"collection","title":"Device Management","type":"topic","url":"\/documentation\/devicemanagement"},"doc://com.apple.devicemanagement/documentation/DeviceManagement/Cancel-Enhanced-Log-Collection-Command":{"abstract":[{"text":"Cancel enhanced log collection on the device.","type":"text"}],"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/Cancel-Enhanced-Log-Collection-Command","kind":"symbol","navigatorTitle":[{"kind":"text","text":"Cancel Enhanced Log Collection"}],"role":"symbol","title":"Cancel Enhanced Log Collection","type":"topic","url":"\/documentation\/devicemanagement\/cancel-enhanced-log-collection-command"},"doc://com.apple.devicemanagement/documentation/DeviceManagement/StatusEnhancedLoggingAppleCareToken":{"abstract":[{"text":"The status item that reports the device’s enhanced log collection session AppleCare token.","type":"text"}],"fragments":[{"kind":"text","text":"object "},{"kind":"identifier","text":"StatusEnhancedLoggingAppleCareToken"}],"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/StatusEnhancedLoggingAppleCareToken","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StatusEnhancedLoggingAppleCareToken"}],"role":"symbol","title":"StatusEnhancedLoggingAppleCareToken","type":"topic","url":"\/documentation\/devicemanagement\/statusenhancedloggingapplecaretoken"},"doc://com.apple.devicemanagement/documentation/DeviceManagement/StatusEnhancedLoggingStatus":{"abstract":[{"text":"The status item that reports the device’s enhanced log collection session status.","type":"text"}],"fragments":[{"kind":"text","text":"object "},{"kind":"identifier","text":"StatusEnhancedLoggingStatus"}],"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/StatusEnhancedLoggingStatus","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StatusEnhancedLoggingStatus"}],"role":"symbol","title":"StatusEnhancedLoggingStatus","type":"topic","url":"\/documentation\/devicemanagement\/statusenhancedloggingstatus"},"doc://com.apple.devicemanagement/documentation/DeviceManagement/StatusEnhancedLoggingTimestamp":{"abstract":[{"text":"The status item that reports the device’s enhanced log collection session timestamp.","type":"text"}],"fragments":[{"kind":"text","text":"object "},{"kind":"identifier","text":"StatusEnhancedLoggingTimestamp"}],"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/StatusEnhancedLoggingTimestamp","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StatusEnhancedLoggingTimestamp"}],"role":"symbol","title":"StatusEnhancedLoggingTimestamp","type":"topic","url":"\/documentation\/devicemanagement\/statusenhancedloggingtimestamp"},"doc://com.apple.devicemanagement/documentation/DeviceManagement/Trigger-Enhanced-Log-Collection-Command":{"abstract":[{"text":"Trigger enhanced log collection on the device.","type":"text"}],"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/Trigger-Enhanced-Log-Collection-Command","kind":"symbol","navigatorTitle":[{"kind":"text","text":"Trigger Enhanced Log Collection"}],"role":"symbol","title":"Trigger Enhanced Log Collection","type":"topic","url":"\/documentation\/devicemanagement\/trigger-enhanced-log-collection-command"},"doc://com.apple.devicemanagement/documentation/DeviceManagement/TriggerEnhancedLogCollectionCommand":{"abstract":[{"text":"The command to trigger enhanced log collection on the device.","type":"text"}],"fragments":[{"kind":"text","text":"object "},{"kind":"identifier","text":"TriggerEnhancedLogCollectionCommand"}],"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/TriggerEnhancedLogCollectionCommand","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"TriggerEnhancedLogCollectionCommand"}],"role":"symbol","title":"TriggerEnhancedLogCollectionCommand","type":"topic","url":"\/documentation\/devicemanagement\/triggerenhancedlogcollectioncommand"},"doc://com.apple.devicemanagement/documentation/DeviceManagement/TriggerEnhancedLogCollectionResponse":{"abstract":[{"text":"A response from the device after it processes the command to trigger enhanced log collection on the device.","type":"text"}],"fragments":[{"kind":"text","text":"object "},{"kind":"identifier","text":"TriggerEnhancedLogCollectionResponse"}],"identifier":"doc:\/\/com.apple.devicemanagement\/documentation\/DeviceManagement\/TriggerEnhancedLogCollectionResponse","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"TriggerEnhancedLogCollectionResponse"}],"role":"symbol","title":"TriggerEnhancedLogCollectionResponse","type":"topic","url":"\/documentation\/devicemanagement\/triggerenhancedlogcollectionresponse"},"doc://com.apple.documentation/documentation/technologies":{"abstract":[],"identifier":"doc:\/\/com.apple.documentation\/documentation\/technologies","kind":"technologies","role":"overview","title":"Technologies","type":"topic","url":"\/documentation\/technologies"}}}