Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Share point team site instead of communication site #178

Closed
vamsivks opened this issue Mar 12, 2020 · 4 comments
Closed

Create Share point team site instead of communication site #178

vamsivks opened this issue Mar 12, 2020 · 4 comments

Comments

@vamsivks
Copy link

I just want to know how to create team site using rest-python-client

whenever I'm creating a site using WebCreationInformation it's creating communication site in Sharepoint . can anyone give me a suggestion?

@vamsivks vamsivks changed the title Share point team site instead of communication site Create Share point team site instead of communication site Mar 12, 2020
@vamsivks
Copy link
Author

Along with above can you provide some example for a document library and folder creation inside team site with file upload?

@vgrem
Copy link
Owner

vgrem commented Mar 15, 2020

Greetings,

the support for provisioning of modern has been introduced in the latest change

Methods

  • create Team site: GroupSiteManager.create_group_ex(display_name, alias, is_public, optional_params)

  • create Communication site: SPSiteManager.create(request) where request is of SPSiteCreationRequest type

Examples

Create a Team Site

client = ClientContext(url, ctx_auth)
site_manager = GroupSiteManager(client)
info = site_manager.create_group_ex("Team Site", "teamsite", True, None)
client.execute_query()

Create a Communication site

client = ClientContext(url, ctx_auth)
site_manager = SPSiteManager(client)
request = SPSiteCreationRequest("CommSite", "https://contoso.sharepoint.com/sites/commsite")
response = site_manager.create(request)
client.execute_query()

@vgrem vgrem closed this as completed Mar 15, 2020
@vamsivks
Copy link
Author

vamsivks commented Mar 16, 2020

Hi,

isn't updated in pip package @vgrem ?

@vgrem
Copy link
Owner

vgrem commented Mar 16, 2020

@vamsivks , not yet, but planned to be released this week.
Meanwhile, the latest version could be installed from GitHub:

pip install git+https://github.com/vgrem/Office365-REST-Python-Client.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants