-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#735 fix for SiteProperties.update() and examples updates
- Loading branch information
Showing
15 changed files
with
169 additions
and
161 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
.get() | ||
.execute_query() | ||
) | ||
print(app.display_name) | ||
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
This file was deleted.
Oops, something went wrong.
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
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,31 @@ | ||
""" | ||
Set external sharing on site collections in Office 365 | ||
https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/set-external-sharing-on-site-collections-in-office-365 | ||
""" | ||
|
||
from office365.sharepoint.client_context import ClientContext | ||
from office365.sharepoint.tenant.administration.sharing_capabilities import ( | ||
SharingCapabilities, | ||
) | ||
from tests import ( | ||
test_admin_site_url, | ||
test_cert_thumbprint, | ||
test_client_id, | ||
test_team_site_url, | ||
test_tenant, | ||
) | ||
|
||
admin_client = ClientContext(test_admin_site_url).with_client_certificate( | ||
test_tenant, test_client_id, test_cert_thumbprint, "../../selfsignkey.pem" | ||
) | ||
|
||
# admin_client = ClientContext(test_admin_site_url).with_credentials( | ||
# test_admin_credentials | ||
# ) | ||
|
||
site_props = admin_client.tenant.get_site_properties_by_url( | ||
test_team_site_url | ||
).execute_query() | ||
site_props.sharing_capability = SharingCapabilities.ExternalUserAndGuestSharing | ||
site_props.update().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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import json | ||
""" | ||
Retrieves the current user details | ||
""" | ||
|
||
from office365.sharepoint.client_context import ClientContext | ||
from tests import test_client_credentials, test_team_site_url | ||
|
||
ctx = ClientContext(test_team_site_url).with_credentials(test_client_credentials) | ||
whoami = ctx.web.current_user.get().execute_query() | ||
print(json.dumps(whoami.to_json(), indent=4)) | ||
print(whoami) |
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from typing import Dict, Optional | ||
|
||
from office365.runtime.paths.service_operation import ServiceOperationPath | ||
|
||
|
||
class StaticOperationPath(ServiceOperationPath): | ||
def __init__(self, static_name, parameters=None): | ||
# type: (str, Optional[Dict]) -> None | ||
super(StaticOperationPath, self).__init__(static_name, parameters) |
Oops, something went wrong.