I created an azure event Topic and added an azure function (event trigger type) as a subscription. when trying to send a request through postman I get undefined API version.
Error:
{
"error": {
"code": "ApiVersionUnspecified",
"message": "An API version is required, but was not specified."
}
}
This is the error you get:
As Roman Kiss says, you should use URI like below:
https://<topic-endpoint>?api-version=2018-01-01
(And also you need to authorize it.)
I received this error when I was submitting a GET request instead of a POST request.
Related
i am trying to make the "Read" function of the azure cognitive services working.
I have created the cognitive services and got the 2 Ocp-Apim-Subscription-Key.
After i went to the API Console to test if it is working.
Select the same Location, past the key, send the image and got back "202 Accepted".
Then i went to link with the result but it says
{
"error": {
"code": "401",
"message": "Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."
}
}
Why?
I have tryed with the other key but still got the same error.
The other function, like OCR, are working correctly.
Any one has some ideas?
I have added a user in azure ad. Now using graph api I want to update its display name or let say password. I am referring to this guide https://learn.microsoft.com/en-us/graph/api/user-update?view=graph-rest-1.0&tabs=cs
First of all, I am not sure I am using correct URL to update the user but below is what I am using:
https://graph.microsoft.com/v1.0/users/john#<myorg>.onmicrosoft.com
I am passing the userName of the user which I want to udpate in the url. Please let me know if this is not correct.
I am including the OAuth token as bearer token in my request and posting the below json:
{
"accountEnabled": true,
"displayName": "john12"
}
From the above json, I want to change the display name from john to john12. But I am getting below error:
{
"error": {
"code": "Request_BadRequest",
"message": "Specified HTTP method is not allowed for the request target.",
"innerError": {
"request-id": "536fd7c1-db46-4927-9732-169da778811c",
"date": "2019-06-06T04:58:26"
}
}
}
Please can anyone please let me know how can I update the existing user properties. Thanks
Most probably you're not using HTTP method PATCH. I say this looking at the error message Specified HTTP method is not allowed for the request target.
If you use anything other than PATCH, like a POST you will end up getting this error message.
The JSON body for your request looks fine. I tried updating an existing user with similar JSON and sending a PATCH request from Microsoft Graph Explorer and it worked fine.
I could reproduce the same error message that you're seeing when I used a POST or PUT call from Microsoft Graph Explorer.
Although same request URL with same JSON body worked fine once I changed POST to PATCH. Later on querying the user again (GET), I could see that displayName had been updated correctly
I am attempting to make the Azure Graph API call getMemberGroups, however I am getting a "400 Bad Request" error in response.
According to the documentation [https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/functions-and-actions#getMemberGroups], the following request should be :
I am using POSTMAN to make the request however I keep getting a "Request_BadRequest" error code.
My POST request is:
Where the red bar is the tenant ID and the blue bar is the object ID of the user.
My headers are:
My body is:
I keep getting the error message:
{
"odata.error": {
"code": "Request_BadRequest",
"message": {
"lang": "en",
"value": "Invalid JSON. The value '------' is not a valid number."
}
}
}
I am not too sure why that is happening, does anyone have any clues?
Since we are posting the json data, you shouldn't use the form-data. For the application/json type data, we should use the raw option to send the data.
How to know the authorization token of the Ad User
I am try to setup azure function with HTTP triggered and make subsequent call to azure bot framework [bot service on azure].
Following is the error i encountered while setting it up:
{
"id": "ed81eca8-d536-4534-a97d-66e6a7ca7ad2",
"requestId": "ba346904-702b-465c-b7e3-b48afe29ab33",
"statusCode": 500,
"errorCode": 0,
"messsage": "Exception while executing function: Functions.adapter -> Unable to resolve value for property 'BotAttribute.SecretSetting'."
}
Env:
Nodejs dev
Using directline-JS git repo at BotFramework-DirectLineJS
Related questions:
Azure function doesn't notify my bot (Bot Framework)
Azure Function for Bot Framework C#
The secret was defined but i was returning value in a wrong way in azure function. i.e context.done(done,data) where i was passing incoming data directly to output which did not hold secret, rather than modified version of data.
Currently we are in the process of developing one iPhone application that deals with google calendar. There was need of syncing calendar events to the server side. Everything works fine.
But for push notification , we are following this process
Whenever we post request to :
https://www.googleapis.com/calendar/v3/calendars/email#gmail.com/events/watch
with parameters
"id":Unique string ( channel id) ,
"type": "web_hook",
"address": "https://abc-api.herokuapp.com/user/notifications"
In the header , we are sending
Authorization : **Bearer 'Access_token'**
and content type : json
We already added domain as authorized domain in the google api console
Access_token is user's account access token .
We are getting "Unauthorized webhook call" error.
{
"error": {
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://abc-api.herokuapp.com/user/notifications"
}
],
"code": 401,
"message": "Unauthorized WebHook callback channel: https://abc-api.herokuapp.com/user/notifications"
}
}
Anyone here who can help us to solve the issue ?
You might want to check this post, providing solution like verifying if your domain have a valid (not self-signed) SSL license. Also in google-api-php-client GitHub, instead of setting https://example.com/google/push (resulted in Unauthorized WebHook callback channel) or https://www.example.com/google/push (allowed me to successfully open channel, and object has been returned, however webhook has not been fired) as address they tried https://www.example.com/google/push/index.php and worked.
One potential issue is if you're testing in Google's "try it" section of the documentation. It's not stated, but this particular request does not work there.
Otherwise, there are a few things that need to happen with the domain you are supplying in the address. First, you need to make sure its verified in the google developers console for the application you are hitting the api with. Additionally, you need to add the website property to your search console (even if its just an api) and verify ownership.
Also, once you get past the unauthorized address issue, you will get another error requiring a resourceId be supplied.