Graph API PATCH updating mailEnable flag in Unified group objects - microsoft-graph-api

When I use Microsoft Graph API to create an Unified group and then later try to update the group to set the mailEnabled boolean flag to "false", the update REST call appears to be successful, but the mailEnabled flag isn't changed. This is despite having other settings in the same PATCH request (such as flipping visibility from "Public" to "Private" or back again) which do appear to be applied. Interestingly, I get an HTTP response code of 204 (No Content), yet the docs appear to say I should get a 200 response with a JSON version of the full group object.
The example in the documentation at http://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/group_update appears to indicate the mailEnabled is something that you can change on a group. If it isn't, shouldn't there be an error rather than it just succeeding but not doing anything?

Thanks for reporting this Jon. Couple of things:
Yes - this should be a 400 error. We have a bug tracking this now.
Successful PATCH operations should response with a 204. This is a doc bug. Created GitHub issue: https://github.com/OfficeDev/microsoft-graph-docs/issues/131 to track
In general we could do with improving the groups reference materials. Created GitHub issue: https://github.com/OfficeDev/microsoft-graph-docs/issues/132
Hope this helps,

Related

Team id response when creating team

This questions concerns the beta endpoint in Microsoft Graph. Creating teams with the beta endpoint is great because of less calls to the API and I can add from a template. I can't wait till this is available in v1.0.
But I wonder why there is no response object when creating a team this way. I get an OK/success response, but no data. I would like to get a team object or at least a team-id or a reference to use to get to the team when the actual creation is completed.
The reason why I'd like this is that it doesn't seem like the creation request accepts more than one owner in "owners#odata.bind". And on top of this, it seems like the "members#odata.bind" is not recognized. So I need to add more owners (teachers) and members (students).
In addition, I'd like to set a team photo after creation complete. And...I need the team id in my app.
I am adding teams from template "educationClass" at this point.
Any ideas?
It's stated in the documentation that even if the team creation request returns an OK/success response with no content, it also returns the Location header with reference to both team and the teamsAsyncOperation, which in my case solve the problem.

ErrorIrresolvableConflict response when attempting to delete calendar events

The delete event endpoint occasionally responds with a 412 / ErrorIrresolvableConflict status code when attempting to delete an event. The message supplied in the response is:
The send or update operation could not be performed because the change key passed in the request does not match the current change key for the item.
The error description for ErrorIrresolvableConflict suggests that one should:
Retrieve the updated change key and try again.
Glancing at the event resource description I see the changeKey mentioned as a property of an event, but nothing in the delete event endpoint docs suggests that the changeKey needs to be supplied when deleting an event or how one would do so.
I see a couple of similar questions on SO pertaining to sending emails and adding attachments but searching around yields nothing about deleting calendar events.
This error happens transiently and I have yet to find a way to consistently reproduce it. It does not seem to be related to whether the event has attachments.
This error was observed on the following request:
request-id: 05cffaf7-c422-4bfd-97ac-6ea6d1036021
We are having similar issues (see my question here: Getting error code `ErrorIrresolvableConflict` responses when trying to create events on a calendar using Outlook REST API) when creating calendar events through the REST Api. It subsided for a bit (to only several times a day) but since January 2nd has started happening frequently again.

Default REST API returns deleted items

Our team is leveraging the Sitefinity default REST API (i.e. /api/default/products) in order to perform data operations on an external job. We are able to distinguish products by site/provider and culture without issue. This is currently working for the most part but with a frustrating potential bug.
It seems that the API returns the Live version of the content as expected, but it also returns content of that type that has been Deleted and is sitting in the Recycle Bin. Documentation on this has been scarce and I have not seen it mentioned in other posts. I am looking for a parameter or filter that will remove Deleted/Recycle Bin items from the response in the Sitefinity default REST API?
I opened a support ticket with Telerik/Progress and they confirmed this is a bug. The rep stated that it will be resolved in Sitefinity 11. For now the only workarounds are to make sure items are unpublished before deleted or removed from the recycle bin. Alternatively, one could create their own endpoints that use the ModuleManagers that provide access to the lifecycle of content.

Microsoft Graph Webhooks subscription on /users - not usable in current format

So having been to Ignite in 2017 I was really excited with the new possibilites the Webhooks in Microsoft Graph and binding to Azure functions.
Recently I got the chance to really explore this for myself.
I am looking at this from the perspective of Identity Management - I really want to see what kind of user onboarding/change management we can react to and process with Graph Webhooks and Azure functions. So I started looking at the beta endpoint and the Webhooks available for "/users"
The first thing that struck me was that in the beta only "updated" or "deleted" is a valid changetype. I really would like "created" - since that is when the most work would get done on a user (for example generating some unique attribute values)
Ok I thought and just tried looking at "/users" and only changetype="updated". I created a subscription and an basic Azure function to handle the requests. Updated a user in Azure AD (just changed "Last name" attribute) and sure enough a trigger was sent to my Azure function
Now comes my biggest problems - this is really unusable in its current form.
his seems to react to the all changes /users and i guess the trigger response could contain several users.
It really would be preferable to get individual triggers for each object changed in /users even though they were changed at the same time
Looking at the actual information sent here lies the BIG problem.
I get the id of the user changed (good, but also expected)
I get the organizationId (ok..)
I get the eventTime (good)
I get a sequenceNumber (unsure what this is?)
I get subscriptionExpirationDateTime (ok fine good to have)
I get subscriptionId for the webhook (ok fine good to have)
... but WHERE is information about what data was changed??? Nowhere to be found is what attributes of the user were changed (i my case "Last name"). This makes the triggers totally unusable for "/users" and I cant really think of anyone who could use this function as is?
Sure I know the object was changed but I have no idea WHAT happened and if the change was relevant to my function
Please tell me there are plans to include the actual changes in the trigger response?
EDIT: ok right, yeah this is more a feature request from the actual developers of ms graph - will look for a better place to get this answered
Please provide feature requests here (ex: richer data in notifications, "created" change type) : https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback?category_id=101632
Here are answers to other questions.
Microsoft graph doesn't guarantee ordering of events when sending notifications (ex: your webhook endpoint could be down and we will retry events delayed by up to 4 hours or drop if the outage is longer than 4 hours). Hence "SequenceNumber" can be used to track if an event is in order and hence used as is or if it is out of order and needs a query to Graph to get current state.
Currently, we provide Ids of objects and associations (member, manager) that have changed, whether the object/associations is deleted or updated but not details of other properties that were changed. In its current form, webhook is best used with delta query. Instead of polling delta query every X minutes and in most cases receiving zero changes, developers can create a subscription and perform delta query only when a notification is received. This would help scale in case there are many tenants that needs to be polled.
Delta Query: https://developer.microsoft.com/en-us/graph/docs/concepts/delta_query_overview
Also FYI, webhook notifications for user/group is now also available in V1.0

How to show future events with organizer_list_events on the EventBrite API

I always get ended events from the eventBrite api when i use the organizer_list_events. I tried with statuses live, started (and both). But that doesn't seem to work.
The event_search api has a "date:Future" possibility. Which is working fine, but then I don't have a possibility to pass the organiserId.
Note, I work on the platform team at Eventbrite
organizer_list_events does not accept a status parameter:
http://developer.eventbrite.com/doc/organizers/organizer_list_events/
However, user_list_events does:
http://developer.eventbrite.com/doc/users/user_list_events/
In the case that one user has one organizer, these calls should return the same data. It's possible for one user to have multiple organizers, in which case user_list_events could return more data than needed. Still, using the status parameter should cut down on what you're currently receiving.
We're in the process of building a new and much improved API, but I can look at adding a status field to organizer_list_events.
Using the user_list_events I just did this (in c#):
items = XElement.Parse(xmlResult).Elements("event").Where(e=>e.Element("organizer").Element("id").Value == this.OrganiserId.ToString());

Resources