5
5
from office365 .directory .applications .api import ApiApplication
6
6
from office365 .directory .applications .optional_claims import OptionalClaims
7
7
from office365 .directory .applications .public_client import PublicClientApplication
8
+ from office365 .directory .applications .required_resource_access import (
9
+ RequiredResourceAccess ,
10
+ )
8
11
from office365 .directory .applications .roles .role import AppRole
9
12
from office365 .directory .applications .spa import SpaApplication
10
13
from office365 .directory .certificates .certification import Certification
@@ -53,7 +56,7 @@ def add_certificate(
53
56
:param datetime.datetime end_datetime: The date and time at which the credential expires. Default: now + 180days
54
57
"""
55
58
if start_datetime is None :
56
- start_datetime = datetime .datetime .utcnow ()
59
+ start_datetime = datetime .datetime .now ()
57
60
if end_datetime is None :
58
61
end_datetime = start_datetime + datetime .timedelta (days = 180 )
59
62
@@ -315,6 +318,16 @@ def extension_properties(self):
315
318
),
316
319
)
317
320
321
+ @property
322
+ def required_resource_access (self ):
323
+ """Specifies the resources that the application needs to access. This property also specifies the set
324
+ of delegated permissions and application roles that it needs for each of those resources.
325
+ This configuration of access to the required resources drives the consent experience.
326
+ """
327
+ return self .properties .get (
328
+ "requiredResourceAccess" , ClientValueCollection (RequiredResourceAccess )
329
+ )
330
+
318
331
@property
319
332
def token_issuance_policies (self ):
320
333
# type: () -> EntityCollection[TokenIssuancePolicy]
@@ -339,6 +352,7 @@ def get_property(self, name, default_value=None):
339
352
"optionalClaims" : self .optional_claims ,
340
353
"passwordCredentials" : self .password_credentials ,
341
354
"publicClient" : self .public_client ,
355
+ "requiredResourceAccess" : self .required_resource_access ,
342
356
"tokenIssuancePolicies" : self .token_issuance_policies ,
343
357
}
344
358
default_value = property_mapping .get (name , None )
0 commit comments