-
-
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.
examples updates, remove sensitive data (cert)
- Loading branch information
Showing
4 changed files
with
25 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
""" | ||
Gets site collection administrators | ||
""" | ||
|
||
from office365.sharepoint.sites.site import Site | ||
from office365.sharepoint.tenant.administration.tenant import Tenant | ||
from tests import test_admin_site_url, test_site_url, test_user_credentials | ||
|
||
tenant = Tenant.from_url(test_admin_site_url).with_credentials(test_user_credentials) | ||
|
||
target_site = ( | ||
Site.from_url(test_site_url) | ||
.with_credentials(test_user_credentials) | ||
.get() | ||
.execute_query() | ||
) | ||
result = tenant.get_site_secondary_administrators( | ||
site_id=target_site.id | ||
).execute_query() | ||
for admin in result.value: | ||
print(admin.loginName) |
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