User Profile
dafo43
Copper Contributor
Joined Mar 19, 2020
User Widgets
Recent Discussions
Get-CsOnlineUser access denied via Azure application
Hi, I'm trying run the Get-CsOnlineUser command via an Azure App that connects using the MicrosoftTeams module: Connect-MicrosoftTeams -CertificateThumbprint $thumbprint -ApplicationId $clientID -TenantId $tenantID I run the command: Get-CsOnlineUser -Identity xxx but get the error: Get-CsOnlineUser: Access Denied. I tried the latest versions of the Teams module, including the beta (5.8.1) but get the same error. According to Microsoft the CS command should work with the API permission Organization.Read.All which I have set - https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-application-authentication#cmdlets-supportedSolved3KViews0likes3CommentsGraph API and Powershell
I'm looking to use the Graph API to get some Teams stats using PowerShell - https://docs.microsoft.com/en-us/graph/api/reportroot-getteamsuseractivitycounts?view=graph-rest-1.0 . The content seems to return values but just a long list of numbers, no rows or columns, and there is nothing to identify which Team the stats belong to. Are there any examples of this working with PowerShell? $ADALpath = 'C:\Program Files\WindowsPowerShell\Modules\AzureADPreview\2.0.2.89\Microsoft.IdentityModel.Clients.ActiveDirectory.dll' $tenantID = "xxx" $appID = "xxx" $client_secret = "xxx" try { Add-Type -Path $ADALpath -ErrorAction Stop } catch { Write-Error "Unable to load ADAL binaries, make sure you are using the correct path!" -ErrorAction Stop } $authContext = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext" -ArgumentList "https://login.windows.net/$tenantID" $ccred = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.ClientCredential -ArgumentList $appID,$client_secret $authenticationResult = $authContext.AcquireTokenAsync("https://graph.microsoft.com", $ccred) if (!$authenticationResult.Result.AccessToken) { Write-Error "Failed to aquire token!"; return } $authHeader = @{'Authorization'=$authenticationResult.Result.CreateAuthorizationHeader()} $uri = "https://graph.microsoft.com/v1.0/reports/getTeamsUserActivityCounts(period='D7')" $result = Invoke-WebRequest -Headers $AuthHeader -Uri $uri $teams = ($result.Content | ConvertFrom-Json).ValueSolved1.5KViews0likes2CommentsRe: Call records Powershell sample
Trinetra-MSFTThanks, though it doesn't really help me, I'm not a developer so I only know Powershell. From what I was reading I need to get a subscription to get all the calls back for the previous day, which would give the ID. But again there is no sample of how to do this in Powershell. I have the Azure application setup correctly, it's just a case of making the correct Graph calls.11KViews0likes1CommentCall records Powershell sample
Hi, I'm trying to get a list of all Teams calls for the previous day. I'm following the instructions from TechNet - https://docs.microsoft.com/en-us/graph/api/resources/callrecords-api-overview?view=graph-rest-beta and have the applications setup correctly but don't know what call to make, in the documentation all it mentions is: GET https://graph.microsoft.com/beta/communications/callRecords/{id} Are there any samples of getting all calls for a particular date?12KViews0likes3Comments
Recent Blog Articles
No content to show