-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
202 additions
and
118 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
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
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,18 @@ | ||
""" | ||
Shares a folder | ||
""" | ||
from office365.sharepoint.client_context import ClientContext | ||
from office365.sharepoint.sharing.external_site_option import ExternalSharingSiteOption | ||
from tests import ( | ||
test_team_site_url, | ||
test_user_credentials, | ||
test_user_principal_name, | ||
) | ||
|
||
ctx = ClientContext(test_team_site_url).with_credentials(test_user_credentials) | ||
folder_url = "Shared Documents/Archive" | ||
folder = ctx.web.get_folder_by_server_relative_path(folder_url) | ||
result = folder.list_item_all_fields.share( | ||
test_user_principal_name, ExternalSharingSiteOption.View | ||
).execute_query() | ||
print(result.url) |
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.