Add SharePoint on premise site as a tab in Microsoft Teams

Currently there is no integration available to add a SharePoint on premise library or site as storage like we have a connected SharePoint online with Microsoft Teams.

I don’t think a feature like this will be released soon as well but there is an easy way to add a library or site as Website tab in any Teams.

This of course does not provide you seamless integration but atleast provides you access to on premise SharePoint site or library inside Teams.

You can view this small video to understand how to do it, you can add any website SharePoint site, library or any other site

Add website as tab in Microsoft Teams

Connect with me on Twitter or Linked In if you need more information.

How to call Microsoft Graph API from PowerShell to get Microsoft Teams details?

Let’s start with PowerShell script and then we can break it down, so here is a code which can get details of a team using Graph API.

There are bunch of parameters which you need to replace it with your own details and in this blog I will explain how to get those.

$clientId = "<<yourclientid>>"  
$clientSecret = "<<yourclientsecret>>"  
$tenantName = "<<yourteanantname">>  
$resource = "https://graph.microsoft.com/"  
$URL = "https://graph.microsoft.com/v1.0/teams/<<yourteamdid>>"  
  
  
$tokenBody = @{  
    Grant_Type    = "client_credentials"  
    Scope         = "https://graph.microsoft.com/.default"  
    Client_Id     = $clientId  
    Client_Secret = $clientSecret  
}   
  

$tokenResponse = Invoke-RestMethod -Uri "https://login.microsoftonline.com/$TenantName/oauth2/v2.0/token" -Method POST -Body $tokenBody  
Invoke-RestMethod -Headers @{Authorization = "Bearer $($tokenResponse.access_token)"} -Uri $URL

So let’s start with “yourclientid” and “yourclientsecret”, for these we need to login to Azure portal and do an “App Registration”. To call an Graph API you need an App to with correct access to resources.

URL to Azure portal: https://portal.azure.com/

Follow below steps to get the App Registration done:

  • Once you have logged into Azure portal, search for “App Registration” and click “New registration”
Azure App Registration
Azure New Registration
  • Give a name as you would like and click “Register”.
Register App in Azure
  • Important thing to note is Application (client) ID which you need to provide as <<yourclientid>>
App Registration Azure
  • Click on API permissions on left and click “Add a permission” and then select “Application permissions”.
API Permissions Graph
  • We have to give specific permissions so that we can read data, search for “group” and select “Read.All” as shown below and the click “Add Permissions”.
Add Permissions Azure API
  • Don’t forget to click “Grand admin consent for xxxx” else your API will not work
Add Permissions Azure Graph API
  • Next step is to create a secret so click “Certificates & secrets” on left menu. Click on “New Client Secret” and give a name and click Add, If it’s production better to select Expires as Never.
Certificates and Secrets Graph API
  • Once created please copy and keep it which will be our another pramater that is “<<yourclientsecret>>”.
Client Secret Graph API
Install-Module MicrosoftTeams
Import-Module MicrosoftTeams
$credentials=Get-Credential
Connect-MicrosoftTeams -Credential $credentials
Get-Team

So now we have got all the parameters so you can run the PowerShell by applying the values you have found and created and result will be like below

So this is a very basic example of calling Graph API from PowerShell and get details of Teams.

I will be writing another blog very soon to get all Apps used in Teams of a tenant which will be based on above concept.

Connect with me on Twitter or Linked In if you need more information.

References:

Coronavirus (Covid-19) Impact: how we work, live and survival of fittest

Coronavirus has changed the way we live and work unprecedently. These has been difficult times for everyone and I can bet no one is untouched by this.

Things have changed in many ways for us, companies in terms of the way we work, comapnies operate and collaborate together.

Social media has been flooded with tips around how to work from home, how to take meeting etc, I am not an expert on how to work from home so I am not going to tell you anything about it even though I have been working from home for past two months now, earlier I use to work once or twice in a month.

I can certainly say that it works and it is not so difficult if you are determine to make it work and people like us who are from IT background always find a way to work with IT tools.

The challenge has been more for people from non IT backgrounds who are more than ever dependent on IT tools to work and collaborate together, conduct meetings, training etc virtually rather than in person.

Even if you are from IT background learning curve has been steeper more than ever to cope with new tools or how to use the existing tools in most efficient way.

I must say that the phrase “Survival of fittest” is true now in every sense of way, be it for health, work or companies or tools / apps.

Although all kind of institutions have been impacted due to this but my focus has been on schools, colleges and healthcare.

A tool which has seen a sharp increase in usage is Microsoft Teams, if we talk about numbers it has now more than 75 million daily active users by April end which was 44 million just a month ago in March. Microsoft teams has 200 million daily meeting participants.

We can very easily infer that Microsoft Teams is the fittest of all in its competition not just due to numbers but the way it enhances productivity and easy to collaborate, it has a great concept of chat based workspace with countless high quality apps available to be used created by Microsoft and partners.

Check my references at end if you would like to start using Microsoft Teams.

We at CGI has also been impacted like everybody else but I can say CGI has played at front, not only we contributed socially for different causes but we have taken challenges such as rolling out Microsoft Teams in just two weeks of time.

We have an initiative going on called “Respond, Rebound and Reinvent”, more details here: https://www.cgi.com/en/article/cgi3r/working-together-respond-rebound-and-reinvent-through-phases-pandemic

Read some interesting articles here:

https://www.cgi.com/canada/en/article/cgi3r/cgi-deploys-microsoft-teams-4000-remote-client-staff-just-over-two-weeks

https://www.cgi.com/en/case-study/cgi3r/cgi-helps-carrefour-completed-1-5-million-online-orders

https://www.cgi.com/en/case-study/cgi3r/using-automation-help-improve-patient-and-physician-care-and-flatten-curve

I can certainly say that CGI is one of the fittest if not fittest of all.

Connect with me on Twitter or Linked In if you need more information.

References:

https://teamsdemo.office.com/#/0/0

https://techcommunity.microsoft.com/t5/microsoft-teams-blog/bg-p/MicrosoftTeamsBlog