How to decrypt data key of resource

Verum 1 Reputation point
2021-03-16T18:58:28.873+00:00

Hi, I am working on Graph ChatMessage subscription. I am able to create subscription successfully but having hard time to decrypt the data at client. I created the certificate using certbot (which created privkey.pem and fullchain.pem) when creating the subscription I pass the fullchain.pem data Subscriptions request. I need help on how to decrypt the notification data in c#. sample code will help me.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,836 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Danstan Onyango 3,741 Reputation points Microsoft Employee
    2021-03-17T10:02:32.803+00:00

    Since you are dealing with protected APIs here, I am unable to test this to be able to test what you are facing. That said, have you checked out Decrypting resource data?. If you used the encryption key in the right format (note the base 64 encoding in Managing Keys) as per Setting up Notifications that include resource data you should be able to decrypt the data. Please try this and get back with any errors error you get.

    0 comments No comments