Skip to content

Commit cafac72

Browse files
committed
encryption certificate added
1 parent 6103ed8 commit cafac72

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

office365/subscriptions/collection.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def add(
1717
expiration,
1818
client_state=None,
1919
latest_supported_tls_version=None,
20-
include_resource_data=False,
20+
include_resource_data=None,
21+
encryption_certificate=None,
22+
encryption_certificate_id=None,
2123
):
2224
"""
2325
Subscribes a listener application to receive change notifications when the requested type of changes occur
@@ -35,6 +37,16 @@ def add(
3537
:param str latest_supported_tls_version: Specifies the latest version of Transport Layer Security (TLS) that
3638
the notification endpoint, specified by notificationUrl, supports.
3739
The possible values are: v1_0, v1_1, v1_2, v1_3.
40+
:param bool include_resource_data: Indicates whether the resource data for the resource that generated the
41+
change notification should be included in the payload of the notification.
42+
:param str encryption_certificate: Specifies the public key certificate which contains only the public key
43+
that Microsoft Graph uses to encrypt the resource data it returns to your app. For security, Microsoft
44+
Graph encrypts the resource data returned in a rich notification. You must provide a public encryption
45+
key as part of creating the subscription.
46+
:param str encryption_certificate_id: Specifies the identifier of the certificate used to encrypt the content
47+
of the change notification. Use this ID to match in each change notification, which certificate to use
48+
for decryption.
49+
:return: Subscription
3850
"""
3951
return_type = Subscription(self.context)
4052
self.add_child(return_type)
@@ -46,6 +58,8 @@ def add(
4658
"clientState": client_state,
4759
"latestSupportedTlsVersion": latest_supported_tls_version,
4860
"includeResourceData": include_resource_data,
61+
"encryptionCertificate": encryption_certificate,
62+
"encryptionCertificateId": encryption_certificate_id,
4963
}
5064
qry = CreateEntityQuery(self, payload, return_type)
5165
self.context.add_query(qry)

0 commit comments

Comments
 (0)