Micorsoft Graph API Responsibilites Update - microsoft-graph-api

I am attempting to update the responsibilities field on a user account through the Graph API.
I am attempting to do this using the following request:
PATCH https://graph.microsoft.com/v1.0/users/<upn>
{
"responsibilities":[
"ApprovalLimit:0"
]
}
When i make this request, I get the response:
{
"error": {
"code": "-2147024809, System.ArgumentException",
"message": "Invalid attribute update\r\nParameter name: attributeUpdates",
"innerError": {
"request-id": "1be313f3-880b-47de-858d-1bea74951715",
"date": "2017-03-06T09:29:21"
}
}
}
However, when I attempt to update the schools collection, which is also a String collection, this works without issue.
This is the same with both beta and v1.0 and also with the /me endpoint rather than /users/<upn>.
Is this a bug within the API?
Any ideas about how to set this?
Thanks in advance.

I am also able to reproduce this issue too. Based on the error message, it seems this attribute is not support update at current version of Microsoft Graph.
If you want to this attribute is update-able, I suggest that you submit the feedback from here.

Related

Unable to get call details using MS graph API?

I am unable to get call details or call records using graph api.It's saying forbidden in response although I am using application token.In the docs I don't see any extra permission required for this.
Below are the details:
Method : GET
API CALL : https://graph.microsoft.com/beta/communications/callRecords/ce4e4e99-be1b-4c6e-8c43-22308f968d3e
Response :
{
"error": {
"code": "Forbidden",
"message": "",
"innerError": {
"request-id": "4e603f5c-3ac8-466c-acde-24e40f1d6309",
"date": "2021-06-17T13:51:08",
"client-request-id": "4e603f5c-3ac8-466c-acde-24e40f1d6309"
}
}
}
What is the basic requirement for this do I need to set some permission while call in order to get the call record as I am able to call user through graph API.Call.Records.All permission has been set for record and get data.
Please help.
Thanks in Advance.
The API works as it is with the same request but the only issue is that it will return response after certain cases.
The cases are :
1.The call must has ended.
2.Record has been created in the log of Microsoft which usually takes time.
3.Try running the same API with the same configuration but after around 10-15 minutes you will surely get the response.
Follow the document from MS docs for /communincation/calls. The only etxra thing which is not mentioned is that it return after 15min(approx.) call has ended.
This will help others not to get panic as I was.
Thanks

preferredDataLocation field in microsoft graph API not working in v1.0

I am working on a feature where I need to find preferredDataLocation field for all the users but it turns out that it is currently in beta version. How can we check estimated date of this feature going into stable version? I tried to check on Microsoft 365 Roadmap but couldn't find it. I tried to use following request
https://graph.microsoft.com/v1.0/users/delta$select=id,preferredDataLocation
but it gives the following error
{
"error": {
"code": "Request_UnsupportedQuery",
"message": "Invalid property: preferredDataLocation",
"innerError": {
"request-id": "c93a43cb-fa9d-4803-801a-5864439ad66d",
"date": "2020-06-02T09:24:30"
}
}
}
If I use request without delta then it works fine. Example
https://graph.microsoft.com/v1.0/users$select=id,preferredDataLocation
After checking in the metadata the property is not available in v1.0 for users today (only groups). Hence why it fails when requested for delta query. I created a documentation issue to get the documentation fixed.
You can perform the same query using the beta endpoint today as a workaround.

List events API call on Microsoft Graph Java SDK doesn't work for #outlook.com domain

When I tried the following GET request using Microsoft Graph explorer:
https://graph.microsoft.com/beta//me/calendars/joseph.baker.doodle#outlook.com/calendarView?startDateTime=2019-10-24T07:40:43.133Z
I got this response:
{
"error": {
"code": "ErrorInvalidIdMalformed",
"message": "Id is malformed.",
"innerError": {
"request-id": "7ffa9b3c-b5bf-4171-b5ad-242dd831b629",
"date": "2019-11-21T06:30:12"
}
}
}
When I try it with user's calendar ID:
https://graph.microsoft.com/beta//me/calendars/AQMkADAwATM3ZmYAZS0yNDI1LTEwMmMtMDACLTAwCgBGAAADWt9re56XX0ay-rq-yg7yKwcA94f8IFhbyEuRrCHknQvqSwAAAgEGAAAA94f8IFhbyEuRrCHknQvqSwAAADW523EAAAA=/calendarView?startDateTime=2019-10-24T07:40:43.133Z&endDateTime=2019-10-31T07:40:43.133Z
Also for an account with #onmicrosoft.com:
https://graph.microsoft.com/beta//me/calendars/joseph.baker.doodle#onmicrosoft.com/calendarView?startDateTime=2019-10-24T07:40:43.133Z
It works as expected.
Can somebody help me with this? Is the issue domain-related?
Calendars are always referenced by id instead of name. Also, since Outlook.com is a single-user platform, it simply isn't possible to reference another user's resources.
I'm frankly surprised /me/calendars/joseph.baker.doodle#onmicrosoft.com/ since this is not a supported/documented address scheme.

Get Tasks lists from Microsoft beta Graph API

I cannot GET data about the tasks when I use a personal account to login.
GET https://graph.microsoft.com/beta/me/outlook/tasks
When I use my company account to login the REST request works fine,
but when I use personal accounts ( ...#outlook.com, ...#hotmail.com, ...#live.com )the request return the error response:
{
"error": {
"code": "RequestBroker-ParseUri",
"message": "Resource not found for the segment 'Outlook'.",
"innerError": {
"request-id": "d7a97e67-358a-41fa-b70b-81a2096cb4cb",
"date": "2018-01-08T13:30:39"
}
}
}
Any suggestions?
The beta release of Graph's Outlook Tasks API doesn't support Personal/Outlook.com accounts at the moment. It is planned but there isn't an ETA available just yet.
Try: GET https://graph.microsoft.com/beta/me/planner/tasks
I'm not certain, but I think that may be what you're looking for

Unable to update organization properties

I've encountered a problem while trying to update organization's properties using Microsoft Graph API. I've followed these docs and tried it in graph explorer.
My request looks like this:
{ "displayName": "My Company Name" }
Whatever I do I always get the following error:
"error": {
"code": "Request_BadRequest",
"message": "Specified HTTP method is not allowed for the request target.",
"innerError": {
"request-id": "dfd9ae19-2774-4b10-8d74-f6f6cd21f712",
"date": "2016-05-16T14:48:02"
}
}
What am I doing wrong?
I have tried in my test tenant and results in the same error.
https://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/organization
In the above document it is mentioned that we can update "marketingNotificationMails" and "technicalNotificationMails" properties alone through Update API. So I think you can't update the organization display name.
It does appear as though updates are limited on the organization entity. Please file a request to Uservoice to ask for this feature.

Resources