Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. jsonResponse = json.loads(strJSONResponse)
  2. strAccessToken = jsonResponse['access_token']
  3. getHeader = {
  4. "Authorization": "Bearer " + strAccessToken
  5. }
  6.  
  7. r2 = requests.get("https://graph.microsoft.com/v1.0/reports/getTeamsUserActivityUserDetail(date={0})".format(yesterday.strftime('%Y-%m-%d')), headers=getHeader)
  8. strUsageReport = r2.text
  9. print(strUsageReport)
  10.  
  11. [lisa@host ~]# python genReport.py
  12. Getting stats from 2018-12-15
  13. Report Refresh Date,User Principal Name,Last Activity Date,Is Deleted,Deleted Date,Assigned Products,Team Chat Message Count,Private Chat Message Count,Call Count,Meeting Count,Has Other Action,Report Period
  14.  
  15. Sending POST request to strURL=https://outlook.office.com/webhook/.../IncomingWebhook/...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement