Call statistics errors from MS Graph API - api

We are attempting to install (CLOBBA by CODE Software) which carries out advanced reporting for MS Teams calling. In order for this to work, the software needs to retrieve data from the Microsoft Graph API. Unfortunately this is not working as we get the below error:
This is an example of one of the calls being made - https://graph.microsoft.com/beta/communications/callRecords/45578cfe-8329-48b7-ba6b-54a627b00bf4?$expand=sessions($expand=segments)
The graph API response -
{ "error": { "code": "BadRequest", "message": "Unsupported segment type. ODataQuery: /communications/callRecords/0ff73e29-ddf6-4e6f-9963-6e7fcdf43042", "innerError": { "date": "2020-11-05T11:43:19", "request-id": "b1160328-3ce4-46c9-ae7e-da081001d367", "client-request-id": "b1160328-3ce4-46c9-ae7e-da081001d367" } } }

Related

Microsoft Graph API Invalid URI: The hostname could not be parsed. when using /search/query

I'm trying to search calendars by name with the v1.0/search/query endpoint from the Graph API. However even I'm trying the examples from the Explorer I get the following error:
{
"error": {
"code": "InternalServerError",
"message": "Invalid URI: The hostname could not be parsed.",
"innerError": {
"date": "2022-03-28T19:50:56",
"request-id": "ddb02afc-1c82-4884-d352-4a8d80809b20",
"client-request-id": "58147981-de34-ba11-ab1f-6e17dca603f9"
}
}
}
Graph Explorer:
Is this endpoint still supported? Is it not allowed for Applications?
From the output we can see that , in the tip its saying for adding the permissions for accessing Calendar events and its API's.
so please try to add those permissions and retry again. Please refer this DOC

Microsoft Intune API Bad Request

I was calling the Patch API endpoint for Microsoft Graph API's for Intune in order to update the details of devices present in the portal.
PATCH /deviceManagement/managedDevices/{managedDeviceId}
But in response it is returning Bad Request.
{
"error": {
"code": "BadRequest",
"message": "{ \"_version\": 3, \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 2e274924-5fe1-453f-d869-671abf922cfd - Url: https://fef.amsub0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices%28%27e002cd5b-f97f-4212-b0b6-38ae3e77938e%27%29/microsoft.management.services.api.shutDown?api-version=5021-04-16\", \"CustomApiErrorPhrase\": \"\", \"RetryAfter\": null, \"ErrorSourceService\": \"\", \"HttpHeaders\": \"{}\"}",
"innerError": {
"date": "2021-05-31T08:44:54",
"request-id": "c869f3f9-def1-4d7f-93af-16b458bc0b17",
"client-request-id": "2e274924-5fe1-453f-d869-671abf922cfd"
}
}
}
I was following every step mentioned in the documentation. We checked the required permissions and all required permissions were provided. We also tried the beta version of API but that also didn't work. So please help me out here if someone knows a fix for this.

Bad Request Response for Microsoft Intune Device Actions

Our company using Microsoft Graph API to retrieve data about devices. Now we are trying to use it for intune device actions but either we are getting error messages even though we followed everything at Microsoft Graph API docs or nothing happens even though API response success.
we checked the permissions and all needed permissions are given.
we followed docs and tried multiple versions of API URLs mentioned in docs but none of them worked.
we also tried the beta version of API but it didn't work either.
We found some readings about some of these actions work specifically on some OS type or some specific device permissions but we can't find detail on docs.
So we want to use all actions on Intune devices but details on docs are not helpful.
I am getting the following error on related actions
POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/shutDown
{
"error": {
"code": "BadRequest",
"message": "{ \"_version\": 3, \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 2e274924-5fe1-453f-d869-671abf922cfd - Url: https://fef.amsub0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices%28%27e002cd5b-f97f-4212-b0b6-38ae3e77938e%27%29/microsoft.management.services.api.shutDown?api-version=5021-04-16\", \"CustomApiErrorPhrase\": \"\", \"RetryAfter\": null, \"ErrorSourceService\": \"\", \"HttpHeaders\": \"{}\"}",
"innerError": {
"date": "2021-05-31T08:44:54",
"request-id": "c869f3f9-def1-4d7f-93af-16b458bc0b17",
"client-request-id": "2e274924-5fe1-453f-d869-671abf922cfd"
}
}
}
POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/remoteLock
{
"error": {
"code": "BadRequest",
"message": "{ \"_version\": 3, \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 6676f0a0-8895-302e-672b-3cdb66092428 - Url: https://fef.amsub0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices%28%27e002cd5b-f97f-4212-b0b6-38ae3e77938e%27%29/microsoft.management.services.api.remoteLock?api-version=2021-04-07\", \"CustomApiErrorPhrase\": \"\", \"RetryAfter\": null, \"ErrorSourceService\": \"\", \"HttpHeaders\": \"{}\"}",
"innerError": {
"date": "2021-05-31T08:56:10",
"request-id": "a360b06a-fb02-4af3-9f8f-06e138b76288",
"client-request-id": "6676f0a0-8895-302e-672b-3cdb66092428"
}
}
}
I am getting a success response following actions but nothing happens to the devices
POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/rebootNow
POST https://graph.microsoft.com/v1.0//deviceManagement/managedDevices/{managedDeviceId}/wipe

403 Error creating dataSource for com.google.blood_pressure in Google Fit REST API

Goal:
I have a simple web application where I submit my Blood Pressure and Heart Rate measurements.
Now I'd like to submit these measurements to my Google Fit Account.
I tried Googles tutorial: https://developers.google.com/fit/scenarios/write-bp-data
OAuth2 Setup
I created new credentials in one of my existing Cloud Console Projects. And then requested a new authorization code using the following scopes (The project is in Testing State and my account is registered as tester):
https://www.googleapis.com/auth/fitness.blood_pressure.write
https://www.googleapis.com/auth/fitness.heart_rate.write
Requesting the token returns the following response:
{
"access_token": "ya29.XXXXXXXXXXXXXXXX",
"expires_in": 3599,
"refresh_token": "1//XXXXXXXXXXXXXXXX",
"scope": "https://www.googleapis.com/auth/fitness.heart_rate.write https://www.googleapis.com/auth/fitness.blood_pressure.write",
"token_type": "Bearer"
}
As you can see, both write scopes are granted.
Additionally, if I check the permissions in my Google Account, both scopes are set.
Create dataSource
Now I create two dataSources (one for com.google.heart_rate.bpm and one for com.google.blood_pressure).
creating the Heart Rate dataSource works as expected, but creating a dataSource for Blood Pressure returns a 403 PERMISSION_DENIED Error:
Request (POST https://www.googleapis.com/fitness/v1/users/me/dataSources)
{
"dataStreamName": "BPA-BloodPressure",
"type": "raw",
"application": {
"detailsUrl": "https://aaa.bbb.ccc",
"name": "Blood Pressure App",
"version": "1"
},
"dataType": {
"name": "com.google.blood_pressure"
}
}
Response
{
"error": {
"code": 403,
"message": "Scope not included to modify data of type com.google.blood_pressure. Possible scopes: https://www.googleapis.com/auth/fitness.blood_pressure.write",
"errors": [
{
"message": "Scope not included to modify data of type com.google.blood_pressure. Possible scopes: https://www.googleapis.com/auth/fitness.blood_pressure.write",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}
The Google Fit REST API tells me that the Scope fitness.blood_pressure.write is missing, but as you can see the Scope is given for the used access token.
Notes
I am working with Postman to test all requests. Later a Java/Groovy or PHP backend will used.
I also tried with read and write scopes for both data types.
I can see my app with both write scopes in Google Fit under "Connected apps".
Change dataType name to "fitness.blood_pressure" instead of "com.google.blood_pressure"
The body will be like this.
{
"dataStreamName": "BPA-BloodPressure",
"type": "raw",
"application": {
"detailsUrl": "https://aaa.bbb.ccc",
"name": "Blood Pressure App",
"version": "1"
},
"dataType": {
"name": "fitness.blood_pressure"
}
}

Not able to access ##odata.nextLink while fetching booking using microsoft graph api

While calling microsoft graph api for calender events, I am able to get the booking, but I am not able to access #odata.nextLink" Its giving me the below error.
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"request-id": "53abhbbcksbabcjnlkkmaclhabbcak1",
"date": "2019-04-09T13:11:43"
}
}