-
-
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
287 additions
and
322 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,36 @@ | ||
""" | ||
Connect via national clouds (Microsoft 365 GCC High environment) | ||
Microsoft Graph for US Government L4: https://graph.microsoft.us | ||
""" | ||
import msal | ||
|
||
from office365.graph_client import GraphClient | ||
from tests import ( | ||
test_client_id, | ||
test_client_secret, | ||
test_tenant, | ||
test_user_principal_name, | ||
) | ||
|
||
|
||
def acquire_token(): | ||
authority_url = "https://login.microsoftonline.us/{0}".format(test_tenant) | ||
|
||
app = msal.ConfidentialClientApplication( | ||
authority=authority_url, | ||
client_id=test_client_id, | ||
client_credential=test_client_secret, | ||
) | ||
return app.acquire_token_for_client(scopes=["https://graph.microsoft.us/.default"]) | ||
|
||
|
||
def construct_request(request): | ||
request.url = request.url.replace( | ||
"https://graph.microsoft.com", "https://graph.microsoft.us" | ||
) | ||
|
||
|
||
client = GraphClient(acquire_token) | ||
client.before_execute(construct_request) | ||
messages = client.users[test_user_principal_name].messages.get().execute_query() |
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,9 @@ | ||
from office365.entity import Entity | ||
|
||
|
||
class AuthenticationMethodConfiguration(Entity): | ||
""" | ||
This is an abstract type that represents the settings for each authentication method. It has the configuration | ||
of whether a specific authentication method is enabled or disabled for the tenant and which users and groups | ||
can register and use that method. | ||
""" |
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
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.