Graph API. Microsoft Teams. Configure Tab for Document Library. RRS feed

  • Question

  • Hello,

    I'd like to create a Teams from my Azure Web Service.
    And I faced with the following issue.

    I have site collection with lots of webs
    I dynamically create webs there and want to create also Teams for this web.

    As I understand, I cannot create Teams (which will create AD group) with only linking it to existing Web, it will anyway create Site Collection.

    But what I need is to add Tab with Library from this exact web

    Issue is that there is no way to set this tab:

    			var json =
    				'name': 'Document%20Library',
    				'displayName': 'Document%20Library',
    				'teamsAppId': '',
    			var content = new StringContent(json, Encoding.UTF8, "application/json");
    			var result = client.PostAsync($"/beta/teams/{teamId}/channels/{channelId}/tabs", content).Result;
    			var body = result.Content.ReadAsStringAsync().Result;

    This is the code i use to create Document Library Tab
    And after that it should be configured manually to link it with my Web on the other collection.

    And if I add any "configuration":  it will return error 400 Bad Request. (as said in the documents - configuration is not supported)

    1. My main question. Is there any workaround or other way to be able add Tab for some Document library from another site collection using Graph API? Or I do something wrong and I can configure Document Library Tab?

    I cannot use WebSite tab because
    - there is an error on the Tab that connection is not allowed if it was opened in Classic view,
    - no drag n drop allowed

    2. Is it possible to create Teams without creating Site collection? Ex. connect it to existing web(and mb groups)

    Thank you for the assistance,

    Kind regards, Rafael

    • Edited by Shadow LL Wednesday, November 28, 2018 11:56 AM
    Wednesday, November 28, 2018 9:33 AM

All replies