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

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

Related

How do I fix the problem behind "THIRD_PARTY_AUTH_ERROR" when using Google's API Explorer to send a Firebase Cloud Messaging message?

I am trying to create a very simple Web app that can send and receive messages (including Push notifications) via Firebase Cloud Messaging. I want to try testing the ability to receive test messages sent from the Google API Explorer. However, I am running into a curious error as just about any API call from the relevant API URL will return the following error:
{
"error": {
"code": 401,
"message": "Auth error from APNS or Web Push Service",
"status": "UNAUTHENTICATED",
"details": [
{
"#type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "THIRD_PARTY_AUTH_ERROR"
}
]
}
}
For reference, here is the message that I am trying to send:
{
"message": {
"token": "[FCM_TOKEN]",
"notification": {
"title": "New Notification",
"body": "Sample Text"
}
}
}
I also note that when I add "validate_only": true to the message, that the error goes away and the send request succeeds (though this is of no help, as that disables actually sending the message).
I am stumped, becuse the hint that pops up suggests that my OAuth2 credentials are invalid, though I leave the OAuth2 credential option checked and go through the authorization popup to provide my credentials.
Are you running the web app on Firefox, perhaps?
I have been running around my tail with this same issue for days now, and today I've found that there is an issue on Firefox, while this does work on Chrome:
Similar stack overflow question
The issue on the Firebase repository on Github
Although not a proper answer, I hope this helps.

Delete API - TriggerDeleteAPIPipeline.Run failed

I'm currently having problems when trying to delete an API. Basically I followed all steps detailed here: https://cdas.azure.chevron.com/api-and-integration.wiki/API-Products/Delete-API-Utility.html. But when I hit the submit button at the last step It gives me this error here:
TriggerDeleteAPIPipeline.Run failed: { "error": { "code": 502, "source": "msmanaged-na.azure-apim.net", "clientRequestId": "019d9dd4-976f-4bbd-9e4c-aac428af2577", "message": "BadGateway", "innerError": { "error": { "code": "NoResponse", "message": "The server did not receive a response from an upstream server. Request tracking id '08585506028467688679246934075CU94'." } } } }
Any help on how to report this issue? thanks in advance.
I finally got the issue solved. The problem was that I needed to ask for the Personal access token in "full access scope".

How do I correct a URL Inspection API error?

I am trying to have the URL inspection API for my site, but I keep getting this error:
{
"error": {
"code": 403,
"message": "You do not own this site, or the inspected URL is not part of this property.",
"status": "PERMISSION_DENIED"
}
}
Trying to find out how to get this corrected.
First of all your email should have permission for accessing the siteUrl value that you have given in the inspection API. You can check your permission in the Google Search Console by login with your email. Secondly, In the siteUrl you need to give the exact website URL that you are registered in the Google Search Console. In my case, I got the same error because I have given
{
"inspectionUrl": "https://test.com/my-test-inspection-url",
"siteUrl": "https://test.com",
"languageCode": "en-US"
}
Instead of
{
"inspectionUrl": "https://test.com/my-test-inspection-url",
"siteUrl": "https://test.com/",
"languageCode": "en-US"
}
I have registered my website name as https://test.com/ in Google Search Console and I have given the siteUrl value as https://test.com

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