Pulling Skype for Business reports from Microsoft Graph returns report headers but no data











up vote
0
down vote

favorite












About a month ago, I wrote a script in Powershell to harvest user detail usage data from Skype for Business daily. At the time that I wrote it, the script successfully pulled data down and logged it to a csv file. Now, when I run this script, the API call successfully executes and returns the reporting headers, but does not return any data. Has anyone noticed any stability problems with using SkypeForBusiness reporting endpoints?



code for reference:



    $redirectUrl = "https://localhost:8000"
$GraphAPIURI="https://graph.microsoft.com"
$client_id = "app-id"
$client_secret = "app-secret"
$delimiterHeader="sep=;`n"

$D7UserDetailOutput= "D7UserDetail.csv"
$D30UserDetailOutput= "D30UserDetail.csv"
$D90UserDetailOutput= "D90UserDetail.csv"
$D180UserDetailOutput= "D180UserDetail.csv"


Add-Type -AssemblyName System.Web

$tenantid="tenantid"

$url="https://login.microsoftonline.com/$tenantid/oauth2/v2.0/token"
$Auth =
Invoke-RestMethod -Method post `
-ContentType application/x-www-form-urlencoded `
-Uri $url `
-body "client_id=$client_id&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default&client_secret=$client_secret&grant_type=client_credentials"


$D7Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D7')" `
-Method Get `
-TimeoutSec 60
$D30Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D30')" `
-Method Get `
-TimeoutSec 60
$D90Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D90')" `
-Method Get `
-TimeoutSec 60
$D180Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D180')" `
-Method Get `
-TimeoutSec 60

$DataCollection=@($D7Detail,$D30Detail,$D90Detail,$D180Detail)
$FileCollection=@($D7UserDetailOutput,$D30UserDetailOutput,$D90UserDetailOutput,$D180UserDetailOutput)

$SfBUserDetail=""
$SfBUserDetail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Method Get `
-Uri "$($GraphAPIURI)/v1.0/reports/getSkypeForBusinessActivityUserDetail(date=$(Get-date -Date (get-date).AddDays(-1) -Format 'yyyy-MM-dd'))" `
-TimeoutSec 60

$SfBUserDetail | out-file "\ADFS01Brainwave ProjectsDataWave_TemplatesO365AnalyticsSkype for Business Data StorageUserDetailReportsSkypeForBusinessUserDetail_$(Get-date -Date (get-date).AddDays(-1) -Format 'yyyy-MM-dd').csv" -Force:$true









share|improve this question






















  • For someone else running in to the same or similar problem, here's the simple fix - Microsoft had not published the data to these endpoints yet. I was running my harvesting script at 5AM and trying to harvest the previous day's data, but that was not sufficient time for the data to appear at the endpoint. I adjusted the script to pull data from two days previous instead of one days previous and now it functions correctly.
    – HelpfulHound
    Nov 13 at 17:32















up vote
0
down vote

favorite












About a month ago, I wrote a script in Powershell to harvest user detail usage data from Skype for Business daily. At the time that I wrote it, the script successfully pulled data down and logged it to a csv file. Now, when I run this script, the API call successfully executes and returns the reporting headers, but does not return any data. Has anyone noticed any stability problems with using SkypeForBusiness reporting endpoints?



code for reference:



    $redirectUrl = "https://localhost:8000"
$GraphAPIURI="https://graph.microsoft.com"
$client_id = "app-id"
$client_secret = "app-secret"
$delimiterHeader="sep=;`n"

$D7UserDetailOutput= "D7UserDetail.csv"
$D30UserDetailOutput= "D30UserDetail.csv"
$D90UserDetailOutput= "D90UserDetail.csv"
$D180UserDetailOutput= "D180UserDetail.csv"


Add-Type -AssemblyName System.Web

$tenantid="tenantid"

$url="https://login.microsoftonline.com/$tenantid/oauth2/v2.0/token"
$Auth =
Invoke-RestMethod -Method post `
-ContentType application/x-www-form-urlencoded `
-Uri $url `
-body "client_id=$client_id&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default&client_secret=$client_secret&grant_type=client_credentials"


$D7Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D7')" `
-Method Get `
-TimeoutSec 60
$D30Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D30')" `
-Method Get `
-TimeoutSec 60
$D90Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D90')" `
-Method Get `
-TimeoutSec 60
$D180Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D180')" `
-Method Get `
-TimeoutSec 60

$DataCollection=@($D7Detail,$D30Detail,$D90Detail,$D180Detail)
$FileCollection=@($D7UserDetailOutput,$D30UserDetailOutput,$D90UserDetailOutput,$D180UserDetailOutput)

$SfBUserDetail=""
$SfBUserDetail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Method Get `
-Uri "$($GraphAPIURI)/v1.0/reports/getSkypeForBusinessActivityUserDetail(date=$(Get-date -Date (get-date).AddDays(-1) -Format 'yyyy-MM-dd'))" `
-TimeoutSec 60

$SfBUserDetail | out-file "\ADFS01Brainwave ProjectsDataWave_TemplatesO365AnalyticsSkype for Business Data StorageUserDetailReportsSkypeForBusinessUserDetail_$(Get-date -Date (get-date).AddDays(-1) -Format 'yyyy-MM-dd').csv" -Force:$true









share|improve this question






















  • For someone else running in to the same or similar problem, here's the simple fix - Microsoft had not published the data to these endpoints yet. I was running my harvesting script at 5AM and trying to harvest the previous day's data, but that was not sufficient time for the data to appear at the endpoint. I adjusted the script to pull data from two days previous instead of one days previous and now it functions correctly.
    – HelpfulHound
    Nov 13 at 17:32













up vote
0
down vote

favorite









up vote
0
down vote

favorite











About a month ago, I wrote a script in Powershell to harvest user detail usage data from Skype for Business daily. At the time that I wrote it, the script successfully pulled data down and logged it to a csv file. Now, when I run this script, the API call successfully executes and returns the reporting headers, but does not return any data. Has anyone noticed any stability problems with using SkypeForBusiness reporting endpoints?



code for reference:



    $redirectUrl = "https://localhost:8000"
$GraphAPIURI="https://graph.microsoft.com"
$client_id = "app-id"
$client_secret = "app-secret"
$delimiterHeader="sep=;`n"

$D7UserDetailOutput= "D7UserDetail.csv"
$D30UserDetailOutput= "D30UserDetail.csv"
$D90UserDetailOutput= "D90UserDetail.csv"
$D180UserDetailOutput= "D180UserDetail.csv"


Add-Type -AssemblyName System.Web

$tenantid="tenantid"

$url="https://login.microsoftonline.com/$tenantid/oauth2/v2.0/token"
$Auth =
Invoke-RestMethod -Method post `
-ContentType application/x-www-form-urlencoded `
-Uri $url `
-body "client_id=$client_id&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default&client_secret=$client_secret&grant_type=client_credentials"


$D7Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D7')" `
-Method Get `
-TimeoutSec 60
$D30Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D30')" `
-Method Get `
-TimeoutSec 60
$D90Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D90')" `
-Method Get `
-TimeoutSec 60
$D180Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D180')" `
-Method Get `
-TimeoutSec 60

$DataCollection=@($D7Detail,$D30Detail,$D90Detail,$D180Detail)
$FileCollection=@($D7UserDetailOutput,$D30UserDetailOutput,$D90UserDetailOutput,$D180UserDetailOutput)

$SfBUserDetail=""
$SfBUserDetail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Method Get `
-Uri "$($GraphAPIURI)/v1.0/reports/getSkypeForBusinessActivityUserDetail(date=$(Get-date -Date (get-date).AddDays(-1) -Format 'yyyy-MM-dd'))" `
-TimeoutSec 60

$SfBUserDetail | out-file "\ADFS01Brainwave ProjectsDataWave_TemplatesO365AnalyticsSkype for Business Data StorageUserDetailReportsSkypeForBusinessUserDetail_$(Get-date -Date (get-date).AddDays(-1) -Format 'yyyy-MM-dd').csv" -Force:$true









share|improve this question













About a month ago, I wrote a script in Powershell to harvest user detail usage data from Skype for Business daily. At the time that I wrote it, the script successfully pulled data down and logged it to a csv file. Now, when I run this script, the API call successfully executes and returns the reporting headers, but does not return any data. Has anyone noticed any stability problems with using SkypeForBusiness reporting endpoints?



code for reference:



    $redirectUrl = "https://localhost:8000"
$GraphAPIURI="https://graph.microsoft.com"
$client_id = "app-id"
$client_secret = "app-secret"
$delimiterHeader="sep=;`n"

$D7UserDetailOutput= "D7UserDetail.csv"
$D30UserDetailOutput= "D30UserDetail.csv"
$D90UserDetailOutput= "D90UserDetail.csv"
$D180UserDetailOutput= "D180UserDetail.csv"


Add-Type -AssemblyName System.Web

$tenantid="tenantid"

$url="https://login.microsoftonline.com/$tenantid/oauth2/v2.0/token"
$Auth =
Invoke-RestMethod -Method post `
-ContentType application/x-www-form-urlencoded `
-Uri $url `
-body "client_id=$client_id&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default&client_secret=$client_secret&grant_type=client_credentials"


$D7Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D7')" `
-Method Get `
-TimeoutSec 60
$D30Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D30')" `
-Method Get `
-TimeoutSec 60
$D90Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D90')" `
-Method Get `
-TimeoutSec 60
$D180Detail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Uri "https://graph.microsoft.com/v1.0/reports/getSkypeForBusinessActivityUserDetail(period='D180')" `
-Method Get `
-TimeoutSec 60

$DataCollection=@($D7Detail,$D30Detail,$D90Detail,$D180Detail)
$FileCollection=@($D7UserDetailOutput,$D30UserDetailOutput,$D90UserDetailOutput,$D180UserDetailOutput)

$SfBUserDetail=""
$SfBUserDetail=Invoke-RestMethod -Headers @{Authorization =("Bearer "+ $Auth.access_token)} `
-Method Get `
-Uri "$($GraphAPIURI)/v1.0/reports/getSkypeForBusinessActivityUserDetail(date=$(Get-date -Date (get-date).AddDays(-1) -Format 'yyyy-MM-dd'))" `
-TimeoutSec 60

$SfBUserDetail | out-file "\ADFS01Brainwave ProjectsDataWave_TemplatesO365AnalyticsSkype for Business Data StorageUserDetailReportsSkypeForBusinessUserDetail_$(Get-date -Date (get-date).AddDays(-1) -Format 'yyyy-MM-dd').csv" -Force:$true






powershell graph skype






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 9 at 17:31









HelpfulHound

61




61












  • For someone else running in to the same or similar problem, here's the simple fix - Microsoft had not published the data to these endpoints yet. I was running my harvesting script at 5AM and trying to harvest the previous day's data, but that was not sufficient time for the data to appear at the endpoint. I adjusted the script to pull data from two days previous instead of one days previous and now it functions correctly.
    – HelpfulHound
    Nov 13 at 17:32


















  • For someone else running in to the same or similar problem, here's the simple fix - Microsoft had not published the data to these endpoints yet. I was running my harvesting script at 5AM and trying to harvest the previous day's data, but that was not sufficient time for the data to appear at the endpoint. I adjusted the script to pull data from two days previous instead of one days previous and now it functions correctly.
    – HelpfulHound
    Nov 13 at 17:32
















For someone else running in to the same or similar problem, here's the simple fix - Microsoft had not published the data to these endpoints yet. I was running my harvesting script at 5AM and trying to harvest the previous day's data, but that was not sufficient time for the data to appear at the endpoint. I adjusted the script to pull data from two days previous instead of one days previous and now it functions correctly.
– HelpfulHound
Nov 13 at 17:32




For someone else running in to the same or similar problem, here's the simple fix - Microsoft had not published the data to these endpoints yet. I was running my harvesting script at 5AM and trying to harvest the previous day's data, but that was not sufficient time for the data to appear at the endpoint. I adjusted the script to pull data from two days previous instead of one days previous and now it functions correctly.
– HelpfulHound
Nov 13 at 17:32

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53230668%2fpulling-skype-for-business-reports-from-microsoft-graph-returns-report-headers-b%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53230668%2fpulling-skype-for-business-reports-from-microsoft-graph-returns-report-headers-b%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Academy of Television Arts & Sciences

L'Équipe

1995 France bombings