Managing external identities to enable secure access for partners, customers, and other non-employees
Hello Anthony
The key is blank because Microsoft Graph only returns BitLocker key metadata by default for security. You need to call the specific recovery key endpoint with $select=key (using the key ID) and ensure your managed identity has BitlockerKey.Read.All permission with admin consent to retrieve the actual key.
Connect-MgGraph -Identity
$ciSerial = "device serial"
$Device = Get-MgDeviceManagementManagedDevice -Filter "serialNumber eq '$ciSerial'"
$keyInfo = Get-MgInformationProtectionBitlockerRecoveryKey -Filter "deviceId eq '$($Device.AzureADDeviceId)'"
# Now fetch the actual key using the ID
$recoveryKey = Invoke-MgGraphRequest -Method GET `
-Uri "https://graph.microsoft.com/v1.0/informationProtection/bitlocker/recoveryKeys/$($keyInfo.Id)?`$select=key"
Write-Output $recoveryKey
Let me know if any further queries - feel free to reach out!
and click on Yes for was this answer helpful. And, if you have any further query do let us know.