protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken) { //Part of the Bot Framework 4.6 update TeamDetails teamDetails = await TeamsInfo.GetTeamDetailsAsync(turnContext); //The O365 Group id of the current team string office365GroupId = teamDetails.AadGroupId; //Get an object of the GraphServiceClient. See here for more details: https://docs.microsoft.com/en-us/graph/sdks/create-client?tabs=CS var graphClient = await GetGraphServiceClient(); //Once you have the O365 Group Id, you can get further details through the Microsoft Graph, including the SharePoint site url Site site = await graphClient.Groups[office365GroupId].Sites["root"].Request().Select("webUrl").GetAsync(); //Bot echo await turnContext.SendActivityAsync(MessageFactory.Text($"Current Office 365 Group Id is '{office365GroupId}' and the SharePoint site url is '{site.WebUrl}'"), cancellationToken); }