Get-MgInformationProtectionBitlockerRecoveryKey not retrieving key?

Simon Walkden 0 Reputation points
2026-07-13T07:23:59.3933333+00:00

I am attempting to leverage Get-MgInformationProtectionBitlockerRecoveryKey within an azure runbook, authenticating using an automation account. The bitlocker key is not being returned - is this by design?

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-07-13T07:25:02.0933333+00:00

    Yes, this is by design.

    Get-MgInformationProtectionBitlockerRecoveryKey retrieves the BitLocker recovery key object, but does not return the actual recovery key value (key property) by default. The cmdlet description explicitly states that the operation doesn't return the key property unless it is explicitly selected.

    To retrieve the recovery key itself, the runbook must:

    1. Use an identity (service principal/managed identity) that has one of these Microsoft Graph application permissions:
      • BitlockerKey.ReadBasic.All
      • BitlockerKey.Read.All
    2. Call the cmdlet with the -Property "key" parameter (which maps to $select=key in Graph):
         Import-Module Microsoft.Graph.Identity.SignIns
         
         Get-MgInformationProtectionBitlockerRecoveryKey \
             -BitlockerRecoveryKeyId $bitlockerRecoveryKeyId \
             -Property "key"
      

    Including the key property triggers a Microsoft Entra audit of the operation and generates an audit log under the KeyManagement category.

    If -Property "key" is omitted, the cmdlet will return only the metadata of the BitLocker recovery key object, not the recovery key itself.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.