Getting a list of user's public keys for email encryption

Ježek Petr 1 Reputation point
2023-01-06T13:09:37.833+00:00

Hey,
I'm trying to retrieve a list of user's public keys for email encryption inside an organization.
The use case I have in mind is to notify users who haven't yet published their certificate (and therefore can't be sent encrypted emails)
Using the Office 365 Outlook app I can send encrypted emails to users that have published their certificates in the organization's GAL, however I don't see a way to access those published certificates neither via the Outlook app, nor the MS Graph API.
Is there any way to export public keys from GAL or better yet to find out, which users haven't published their certificate?
Thanks in advance.
Peter

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Vasil Michev 128.7K Reputation points MVP Volunteer Moderator
    2023-01-06T13:18:24.557+00:00

    Assuming you're talking about S/MIME certificates here, you can report on these via PowerShell and the Get-Mailbox cmdlet:

    Get-Mailbox -ResultSize Unlimited | ? {$_.UserSMimeCertificate}  
    

    There is no way to obtain such information via the Graph API.

    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.