question

AngelicaEnrquezAmaya-5724 avatar image
0 Votes"
AngelicaEnrquezAmaya-5724 asked JamesHamil-MSFT commented

/teams/allMessages problems to create subscription api

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-webappsazure-ad-graphazure-webapps-development
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AngelicaEnrquezAmaya-5724
This issue is more related to development. So, I will remove Teams tag. Hope you get better response. Thanks for your understanding.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

1 Vote 1 ·

In addition @AngelicaEnrquezAmaya-5724, I would verify the base64 encoding of your certificate. If you're using code, feel free to paste it below.

0 Votes 0 ·

1 Answer

AngelicaEnrquezAmaya-5724 avatar image
1 Vote"
AngelicaEnrquezAmaya-5724 answered JamesHamil-MSFT commented

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, are there any updates with this case? If not, please select the appropriate response as "Answered." Otherwise please let us know how we can assist you.

0 Votes 0 ·