-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intune API support & typings updates
- Loading branch information
Showing
35 changed files
with
936 additions
and
87 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,19 +1,18 @@ | ||
""" | ||
Manage an Azure AD application using Microsoft Graph | ||
https://learn.microsoft.com/en-us/graph/tutorial-applications-basics?tabs=http | ||
https://learn.microsoft.com/en-us/graph/tutorial-applications-basics | ||
You can address an application or a service principal by its ID or by its appId, where ID is referred to | ||
as Object ID and appId is referred to as Application (client) ID on the Azure portal. | ||
""" | ||
from office365.graph_client import GraphClient | ||
from tests import test_client_credentials | ||
from tests.graph_case import acquire_token_by_client_credentials | ||
|
||
client = GraphClient(acquire_token_by_client_credentials) | ||
app = ( | ||
client.applications.get_by_app_id(test_client_credentials.clientId) | ||
.get() | ||
.execute_query() | ||
from tests import ( | ||
test_client_id, | ||
test_client_secret, | ||
test_tenant, | ||
) | ||
|
||
client = GraphClient.with_client_secret(test_tenant, test_client_id, test_client_secret) | ||
app = client.applications.get_by_app_id(test_client_id).get().execute_query() | ||
print(app) |
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,20 @@ | ||
""" | ||
Assign manager | ||
https://learn.microsoft.com/en-us/graph/api/user-post-manager?view=graph-rest-1.0&tabs=http | ||
https://learn.microsoft.com/en-us/graph/api/user-post-manager?view=graph-rest-1.0 | ||
""" | ||
from office365.graph_client import GraphClient | ||
from tests import test_user_principal_name | ||
from tests.graph_case import acquire_token_by_username_password | ||
from tests import ( | ||
test_client_id, | ||
test_password, | ||
test_tenant, | ||
test_user_principal_name, | ||
test_username, | ||
) | ||
|
||
client = GraphClient(acquire_token_by_username_password) | ||
user = client.users.get_by_principal_name(test_user_principal_name) | ||
manager = client.me.assign_manager(user).get().execute_query() | ||
client = GraphClient.with_username_and_password( | ||
test_tenant, test_client_id, test_username, test_password | ||
) | ||
manager = client.users.get_by_principal_name(test_user_principal_name) | ||
client.me.assign_manager(manager).get().execute_query() | ||
print("User manager has been assigned") |
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,19 @@ | ||
""" | ||
Retrieve a list of licenseDetails objects for enterprise users. | ||
https://learn.microsoft.com/en-us/graph/api/user-list-licensedetails?view=graph-rest-1.0 | ||
""" | ||
from office365.graph_client import GraphClient | ||
from tests import ( | ||
test_client_id, | ||
test_password, | ||
test_tenant, | ||
test_username, | ||
) | ||
|
||
client = GraphClient.with_username_and_password( | ||
test_tenant, test_client_id, test_username, test_password | ||
) | ||
result = client.me.license_details.get().execute_query() | ||
for details in result: | ||
print(details) |
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
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
Empty file.
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,5 @@ | ||
from office365.entity import Entity | ||
|
||
|
||
class VirtualEventsRoot(Entity): | ||
""" """ |
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
Empty file.
5 changes: 5 additions & 0 deletions
5
office365/directory/identitygovernance/privilegedaccess/root.py
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,5 @@ | ||
from office365.entity import Entity | ||
|
||
|
||
class PrivilegedAccessRoot(Entity): | ||
"""Represents the entry point for resources related to Privileged Identity Management (PIM).""" |
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
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
Empty file.
5 changes: 5 additions & 0 deletions
5
office365/directory/security/attacksimulations/users/details.py
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,5 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class UserSimulationDetails(ClientValue): | ||
"""Represents a user of a tenant and their online actions in an attack simulation and training campaign.""" |
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
Oops, something went wrong.