-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Directory namespace & Intune API enhancements
- Loading branch information
Showing
15 changed files
with
211 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
Use the Microsoft Search API in Microsoft Graph to search content stored in OneDrive or SharePoint: | ||
files, folders, lists, list items, or sites. | ||
https://learn.microsoft.com/en-us/graph/search-concept-files | ||
""" | ||
import json | ||
|
||
from examples import acquire_token_by_username_password | ||
from office365.graph_client import GraphClient | ||
|
||
client = GraphClient(acquire_token_by_username_password) | ||
result = client.search.query_drive_items("Guide.docx").execute_query() | ||
print(json.dumps(result.value.to_json(), indent=4)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from office365.directory.domains.dns_record import DomainDnsRecord | ||
|
||
|
||
class DomainDnsCnameRecord(DomainDnsRecord): | ||
""" | ||
Represents a CNAME record added to the DNS zone file of a particular domain in the tenant. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class VerifiedDomain(ClientValue): | ||
""" | ||
Specifies a domain for a tenant. The verifiedDomains property of the organization entity is a collection of | ||
verifiedDomain objects. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from office365.entity import Entity | ||
|
||
|
||
class IdentityGovernance(Entity): | ||
""" | ||
The identity governance singleton is the container for the following Azure Active Directory identity governance | ||
features that are exposed through the following resources and APIs: | ||
- Access reviews | ||
- Entitlement management | ||
- App consent | ||
- Terms of use | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from office365.entity import Entity | ||
|
||
|
||
class OrganizationalBrandingProperties(Entity): | ||
""" | ||
An abstract type that exposes properties for configuring an organization's branding. | ||
Organizations can customize their Azure Active Directory (Azure AD) sign-in pages which appear when users sign in to | ||
their organization's tenant-specific apps, or when Azure AD identifies the user's tenant from their username. | ||
A developer can also read the company's branding information and customize their app experience to tailor | ||
it specifically for the signed-in user using their company's branding. | ||
You can't change your original configuration's language as represented by the organizationalBranding object. | ||
However, companies can add different branding based on locale. For language-specific branding, | ||
see the organizationalBrandingLocalization object. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,53 @@ | ||
from office365.entity import Entity | ||
from office365.entity_collection import EntityCollection | ||
from office365.outlook.mail.post import Post | ||
from office365.outlook.mail.recipient import Recipient | ||
from office365.runtime.client_value_collection import ClientValueCollection | ||
from office365.runtime.paths.resource_path import ResourcePath | ||
from office365.runtime.queries.service_operation import ServiceOperationQuery | ||
|
||
|
||
class ConversationThread(Entity): | ||
"""A conversationThread is a collection of posts.""" | ||
|
||
|
||
def reply(self, post): | ||
"""Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation | ||
in the request, or, you can specify just the thread without the parent conversation. | ||
:param Post post: A comment to include. Can be an empty string. | ||
""" | ||
payload = {"post": post} | ||
qry = ServiceOperationQuery(self, "reply", None, payload) | ||
self.context.add_query(qry) | ||
return self | ||
|
||
@property | ||
def cc_recipients(self): | ||
"""The Cc: recipients for the thread.""" | ||
return self.properties.get("ccRecipients", ClientValueCollection(Recipient)) | ||
|
||
@property | ||
def has_attachments(self): | ||
"""Indicates whether any of the posts within this thread has at least one attachment.""" | ||
return self.properties.get("hasAttachments", None) | ||
|
||
@property | ||
def to_recipients(self): | ||
"""The To: recipients for the thread.""" | ||
return self.properties.get("toRecipients", ClientValueCollection(Recipient)) | ||
|
||
|
||
@property | ||
def posts(self): | ||
return self.properties.get('posts', | ||
EntityCollection(self.context, Post, ResourcePath("posts", self.resource_path))) | ||
|
||
def get_property(self, name, default_value=None): | ||
if default_value is None: | ||
property_mapping = { | ||
"ccRecipients": self.cc_recipients, | ||
"toRecipients": self.to_recipients | ||
} | ||
default_value = property_mapping.get(name, None) | ||
return super(ConversationThread, self).get_property(name, default_value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters