Forum Discussion
MaciejPietrzak
Jun 22, 2020Copper Contributor
List of all apps used in teams inside tenant
Hello, Company, what I'm responsible for, wants to disable all 3rd party applications in Teams. But before disabling, they want to know, if there's any used in any team. I've found, that I can c...
- Jun 22, 2020
Here's a sample script I wrote a while back: https://github.com/michevnew/PowerShell/blob/master/Report_Teams_Apps.ps1
More info here: https://www.michev.info/Blog/Post/2829/reporting-on-teams-apps-and-tabs
upfaffer
Nov 17, 2021Brass Contributor
Hi what is requested to handle this:
$client_secret = Get-Content .\ReportingAPIsecret.txt | ConvertTo-SecureString
I have a registered graph App in the tenant, but what is need to do in addition?
$client_secret = Get-Content .\ReportingAPIsecret.txt | ConvertTo-SecureString
I have a registered graph App in the tenant, but what is need to do in addition?
VasilMichev
Nov 17, 2021MVP
That's just an example on how to store the client secret in a more secure way, instead of pasting it in plain text in the script file. If you haven't worked with secure strings in PowerShell, check this article: https://www.pdq.com/blog/secure-password-with-powershell-encrypting-credentials-part-1/
Or you can just replace all that code with your own preferred method to obtain a token.
Or you can just replace all that code with your own preferred method to obtain a token.
- upfafferNov 17, 2021Brass ContributorOk but even if i copy the secret key into the script it doesnt work for me
- VasilMichevNov 17, 2021MVPYou have to replace the entire "get token" section. Like this:
$tenantID = "tenant.onmicrosoft.com"
$appID = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
$client_secret = "verylongsecurestring"
$body = @{
client_id = $AppId
scope = "https://graph.microsoft.com/.default"
client_secret = $client_secret
grant_type = "client_credentials"
}