Geräteinformationen aus Azure AD und Intune über Microsoft Graph auswerten

Informationen von Geräten in Azure AD oder Intune lassen sich mit nur wenig Zeilen PowerShell auswerten und exportieren.

Microsoft hat ihre alljährliche Supportinformation über die kommenden Updates für iOS und iPadOS publiziert. Wie vor einiger Zeit informiert unterstützt Intune für Apple Geräte jeweils die aktuelle Version eines Betriebssystems minus die letzten 2 Major-Releases. Da in den kommenden Monaten iOS 16 publiziert wird informiert Microsoft bereits über die kommende Supportanpassungen. iPhones mit iOS 13 und kleiner fallen bei Veröffentlichung von iOS 16 aus dem Supportzyklus. Eine ähnliche Mitteilung wurde für MacOS publiziert.

iOS und iPadOS
Plan for change: Intune is moving to support iOS/iPadOS 14 and later
Later this year, we expect iOS 16 to be released by Apple. Microsoft Intune, including the Intune Company Portal and Intune app protection policies (APP, also known as MAM), will require iOS 14/iPadOS 14 and higher shortly after iOS 16’s release.


MacOS
Apple is expected to release macOS 13 (Ventura) later this year, Microsoft Intune, the Company Portal app and the Intune mobile device management agent will be moving to support macOS 11.6 (Big Sur) and later. Since the Company Portal app for iOS and macOS are a unified app, this change will occur shortly after the release of iOS/iPadOS 16.

Möchte jemand auswerten welche iOS-Versionen im Tenant registriert sind ist das Betriebssystem und die Version in Azure AD Devices und Intune Devices inkludiert. Die Device Objekte beider Dienste können über Graph APIs ausgewertet werden.

In Azure AD muss jemand sein iOS Smartphone nur registriert haben, zum Beispiel über die Authenticator App. Damit ein Gerät in Intune Devices gelistet ist muss es von der Organisation verwaltet sein. In meinem Beispiel frage ich die Daten von Azure AD ab und filtere die Geräte auf iOS. Für eine Übersicht aller Geräte entferne den Filter in Zeile 7.

  1. Ich registriere mir eine Azure App Registration mit der Berechtigung Device.Read.All.
  1. Ich erstelle ein (temporäres) Zertifikat für die Authentifizierung mit der App. Alternativ ist ein Client Secret möglich.
  1. Mit Get-TAMSAuthToken hole ich mir über die Azure App und dem Zertifikat einen Authentication Token.

Über wenige Zeilen PowerShell kann ich die Auswertung starten, und bei Bedarf das Ergebnis exportieren.

In meinem Beispiel ist es nur ein iOS Gerät.

Zusatztipp für die Abfrage in Intune:
Bei der Abfrage von Geräten in Intune hat Intune über das Property AzureADDeviceId eine Referenz auf das Objekt in Azure AD. Dadurch ist es in Azure AD praktischer das Property DeviceId abzufragen, statt Id. Hier an einem Beispiel für ein verwaltetes Windows Device.

Gerät
in Intune
Gerät
in Azure AD
Share
Avatar photo

Tobias Asböck

Tobias is a Senior System Engineer with more than 10 years of professional experience with Microsoft 365 products such as SharePoint Online, SharePoint Premium, OneDrive for Business, Teams Collaboration, Entra ID, Information Protection, Universal Print, and Microsoft 365 Licensing. He also has 15+ years of experience planning, administering, and operating SharePoint Server environments. Tobias is a PowerShell Scripter with certifications for Microsoft 365 products. In his spare time, Tobias is busy with updates in the Microsoft 365 world or on the road with his road bike and other sports activities. If you have additional questions, please contact me via LinkedIn or [email protected].

Leave a Reply

Your email address will not be published. Required fields are marked *