Microsoft graph create team API not working - microsoft-graph-api

Please find request bellow
PUT https://graph.microsoft.com/v1.0/groups/{id}/team
Content-type: application/json
Request Body
{
"memberSettings": {
"allowCreateUpdateChannels": true
},
"messagingSettings": {
"allowUserEditMessages": true,
"allowUserDeleteMessages": true
},
"funSettings": {
"allowGiphy": true,
"giphyContentRating": "strict"
}
}
Response :
{
"error": {
"code": "BadGateway",
"message": "Failed to execute backend request.",
"innerError": {
"request-id": "d7dd5e79-c675-4310-8a72-d8f4cb92788a",
"date": "2020-05-20T05:55:15"
}
}
}
]

Until now i created teams using the Microsoft Graph .NET API, so there may be a difference there.
But i found out, you have send an ODataType with your request, even if its null, in your case it would be:
{
"memberSettings": {
"allowCreateUpdateChannels": true,
"ODataType": null
},
"messagingSettings": {
"allowUserEditMessages": true,
"allowUserDeleteMessages": true,
"ODataType": null
},
"funSettings": {
"allowGiphy": true,
"giphyContentRating": "strict",
"ODataType": null
},
"ODataType": null
}

Related

Google ads rest api cannot create a campaign "MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT"

I'm trying to create Google Ads campaigns using the Google Adwords API and getting this error MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT
I'm calling this endpoint:
https://googleads.googleapis.com/v10/customers/customerID/campaigns:mutate
with the payload:
{
"operations": [
{
"create": {
"status": "PAUSED",
"advertisingChannelType": "SEARCH",
"advertisingChannelSubType": "SEARCH_EXPRESS",
"paymentMode": "CONVERSIONS",
"name": "TestCampaign",
"campaignBudget": "customers/${customerID}/campaignBudgets/${budgetId}",
"biddingStrategyType": "COMMISSION",
}
}
]
}
Here is the response:
"errors": [
{
"errorCode": {
"operationAccessDeniedError": "MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT"
},
"message": "A mutate action is not allowed on this resource, from this client.",
"trigger": {
"stringValue": ""
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "advertising_channel_sub_type"
}
]
}
},
{
"errorCode": {
"operationAccessDeniedError": "OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE"
},
"message": "This operation is not permitted on this campaign type",
"trigger": {
"stringValue": "SEARCH(SEARCH_EXPRESS)"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "payment_mode"
}
]
}
}
],

Adding image to question item in the new google form rest api

Is it possible to use image in the google drive? If yes, how? I have tried using https://drive.google.com/uc?id= + id, but failed.
error": {
"code": 400,
"message": "Failed to fetch image from source_uri: https://drive.google.com/uc?id=xxxxxxxxxxxxxxxxxxxx",
"status": "INVALID_ARGUMENT"
}
Image
{
"contentUri": string,
"altText": string,
"properties": {
object (MediaProperties)
},
"sourceUri": string
}
I use this form
update = {
"requests": [{
{
"createItem": {
"item": {
"imageItem": {
"image": {
"sourceUri": https://drive.google.com/uc...
}
}
},
"location": {
"index": 0
}
},
},
]
}
service_form.forms().batchUpdate(
formId=form_id, body=update).execute()
Doc https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate

How to create item with column that has strange SharePoint internal encoding?

I created a column with the name "col1" in the list through the web interface Office 365. When I tried to get whole info about this column using msgraph request to
GET /sites/{site-id}/lists/{list-id}/columns/{column-id}
I got such the response:
{
"#odata.context": ...,
"columnGroup": "Custom Columns",
"description": "",
"displayName": "col1",
"enforceUniqueValues": false,
"hidden": false,
"id": "a9fe9dc8-c5b8-467d-8504-23d95f1cc937",
"indexed": false,
"name": "_x0063_ol1",
"readOnly": false,
"required": false,
"number": {
"decimalPlaces": "automatic",
"displayAs": "number",
"maximum": 1.7976931348623157e+308,
"minimum": -1.7976931348623157e+308
}
}
So the problem is that I cannot create an item with that column (I tried both names "col1" and "_x0063_ol1"). The request was to
POST /sites/{site-id}/lists/{list-id}/items
with the body:
{
"fields": {
"Title": "Test2",
"_x0063_ol1": 42
}
}
I got response:
{
"error": {
"code": "invalidRequest",
"message": "Field '_x0063_ol1' is not recognied",
"innerError": {
"request-id": "dbb98ed3-0c2f-48dc-924e-dd888e70c867",
"date": "2018-05-02T07:41:36"
}
}
}
How can I properly create the item with this column using msgraph API?

Unable to Consume northwind ODATA service in WEBIDE

I am new to WEBIDE, I am trying to consume northwind odata services, but so far I have been unsuccessful. Please see my code & help.
connection test on destination also was successful. but still I am getting error:
/V3/Northwind/Northwind.svc/$metadata", statusCode: 404, statusText:
"Not Found", headers: Array(0), body: "The resource you are looking
for has been removed,… its name changed, or is temporarily
unavailable."} responseText:"The resource you are looking for has been
removed, had its name changed, or is temporarily unavailable."
statusCode:404 statusText:"Not Found"
proto:Object
any suggestions, what I might be doing wrong?
neo-app.json:
{
"path": "/destinations/northwind",
"target": {
"type": "destination",
"name": "northwind"
},
"description": "Northwind OData Service"
}
manifest.json:
"sap.app": {
"id": "Mod3Act3",
"type": "application",
"i18n": "i18n/i18n.properties",
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"applicationVersion": {
"version": "1.0.0"
},
"dataSources": {
"northwind": {
"uri": "/V3/Northwind/Northwind.svc/",
"type": "OData",
"settings": {
"odataVersion": "2.0"
}
}
}
},
"sap.ui5": {
"rootView": {
"viewName": "Mod3Act3.view.Main",
"type": "XML"
},
"dependencies": {
"minUI5Version": "1.30.0",
"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.ui.layout": {},
"sap.ushell": {},
"sap.collaboration": {},
"sap.ui.comp": {},
"sap.uxap": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"": {
"dataSource": "northwind"
}
},
"resources": {
"css": [{
"uri": "css/style.css"
}]
}
}
controller
var url = "/V3/Northwind/Northwind.svc";
var oModel1 = new sap.ui.model.odata.ODataModel(url, true);
sap.ui.getCore().setModel(oModel1, "categoryList");
issue was with manifest.json.
"dataSources": {
"northwind": {
"uri": "/destinations/northwind/V3/Northwind/Northwind.svc/",
"type": "OData",
"settings": {"odataVersion": "2.0" }
}
}
this worked
please try the example from the sapui5 walk through:
manifest.json
{
"_version": "1.8.0",
"sap.app": {
...
"ach": "CA-UI5-DOC",
"dataSources": {
"invoiceRemote": {
"uri": "https://services.odata.org/V2/Northwind/Northwind.svc/",
"type": "OData",
"settings": {
"odataVersion": "2.0"
}
}
}
},
"sap.ui": {
...
},
"sap.ui5": {
...
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "sap.ui.demo.walkthrough.i18n.i18n"
}
},
"invoice": {
"dataSource": "invoiceRemote"
}
}
}
}
controller
...
var oModel = this.getView().getModel("invoice");
...
please be aware of the accepting of the certificate due to the https connection and the same origin policy both mentioned in the linked walk through example.

"Overlaps are not supported within TimeSlots" error in Outlook Calendar REST API

From yesterday I started receiving an error in my service (production environment) when trying to call Outlook Calendar REST API endpoint:
POST https://outlook.office.com/api/v2.0/me/findMeetingTimes
with following request body:
{
"Attendees": [
{
"Type": "optional",
"EmailAddress": {
"Address": "...",
"Name": null
}
},
{
"Type": "required",
"EmailAddress": {
"Address": "...",
"Name": null
}
}
],
"LocationConstraint": {
"IsRequired": true,
"SuggestLocation": false,
"Locations": [
{
"DisplayName": "..."
}
]
},
"TimeConstraint": {
"Timeslots": [
{
"Start": {
"DateTime": "2017-05-05T00:00:00",
"TimeZone": "UTC"
},
"End": {
"DateTime": "2017-05-05T21:59:59",
"TimeZone": "UTC"
}
}
]
},
"MaxCandidates": 1000,
"MeetingDuration": "PT30M",
"IsOrganizerOptional": true }
Here is the response I get:
{
"error": {
"code": "ErrorInternalServerError",
"message": "Invalid value for arg:Overlaps are not supported within TimeSlots, value:
{\"start\":2017-05-04T22:00:00Z,
\"min\":1440}
\r\nParameter name: Overlaps are not supported within TimeSlots"
}
}
Everything was working fine with until yesterday. There were no changes in my service codebase. It seems to be related with some changes in O365 API itself but there are no recent updates in documentation...
Any idea what might be wrong?
UPDATE: Without any modification in the request the server response is now:
{
"error": {
"code": "ErrorInternalServerError",
"message": "Index was outside the bounds of the array."
}
}

Resources