/teams/allMessages problems to create subscription api

Angelica Enríquez Amaya 101 Reputation points
2020-09-02T21:04:43.993+00:00

I am trying to create this subscription,

I have this request:
{
"changeType": "created",
"notificationUrl": "https://xxxx.ngrok.io/Chats",
"resource": "/teams/allMessages",
"expirationDateTime": "2020-09-02T20:20:46.9356913Z",
"clientState":"clienteState",
"latestSupportedTlsVersion":"v1_2",
"includeResourceData": true,
"encryptionCertificate": "{base64encodedCertificate}",
"encryptionCertificateId": "1063858CD242BF00346FF4E35E...."
}

but it returns an error
{
"error": {
"code": "InvalidRequest",
"message": "Certificate validation error: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. ",
"innerError": {
"date": "2020-09-02T20:39:41",
"request-id": "cd73c462-3768-4283-9b6b-b7cd7a83fa0c"
}
}
}

I followed this guide to get the certificate:
https://laurakokkarinen.com/authenticating-to-office-365-apis-with-a-certificate-step-by-step/comment-page-2/#creating-the-certificate

I replaced characters in base 64 string.
I do not know what is my problem

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,798 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,339 questions
{count} votes

Accepted answer
  1. Angelica Enríquez Amaya 101 Reputation points
    2020-09-08T18:27:45.757+00:00

    Thank you very much, it is resolved.

    I got the public key with this:
    https://gist.github.com/erikbern/756b1d8df2d1487497d29b90e81f8068

    or:

    Go to https://portal.azure.com
    Click on Azure Active Directory on the left navigation.
    select my app
    Select manifest then: in the json: "keyCredentials": [
    {
    "keyId":
    "value":
    }

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful