Microsoft Graph, user companyname not writable? - azure-active-directory

I am not able to write the property companyName to users via Microsoft Graph (only read).
I notice that the property is not listed in the property documentation, only in the JSON representation:
Is this intended behavior or a bug?

The documentation is incorrect here. It should note that companyName is currently a read-only property.
Thank you for pointing this out, I will make sure the documentation gets updated accordingly.
As noted below by #Ari, companyName is now writable via Microsoft Graph.

Related

How to know people get promoted on Azure AD User Object

I need to get the information if a user in Azure AD get promoted. Information i got so far from this documentation: https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0
There is a JobTitle property, but i don't see property like: JobTitleHistory, or JobTitleChangeDate
Is there a workaround to get the promotion information?
Thanks!
There is no such field like JobTitleHistory, or JobTitleChangeDate.
There is a workaround you can get to know what changes are made to user profile using delta query.
I tested in my environment by changing the JobTittle=Null to JobTittle=Software Engineer :
Delta Query: The purpose of delta query is to retrieve all the
changes.
Use the below URL to generate the #odata.nextLink
URL: https://graph.microsoft.com/v1.0/users/delta/?$filter=id eq‘Object ID’
Use #odata.nextLink link to get the changes to for particular user. Use Key Value prefer:return=minimal in Request Header to get only the updated attribute.
Reference : https://learn.microsoft.com/en-us/graph/delta-query-overview

How to query this new CalendarEvent property names exceptionOccurrences?

Microsoft graph beta end point exposed a new property on the Calendar Event entity for series master id type. Documentation says
"Contains the id property values of the event instances that are exceptions in a recurring series.
Exceptions can differ from other occurrences in a recurring series, such as the subject, start or end times, or attendees. Exceptions do not include cancelled occurrences.
Returned only on $select and $expand in a GET operation which specifies the id of a series master event (that is, the seriesMasterId property value)."
I am running this query but still don't see the above property, What am I missing?
https://graph.microsoft.com/beta/me/events/AAMkADljY2EwNjU2LWVhYTItNDlmMy05ZWE1LTA5Zjc5YzhhZTMyYwBGAAAAAAAJYBHio4VlTKwYgFRcz_44BwC0bqbZ5NLFRoWa_zAJHejIAAAAAAENAABqBW9?$select=subject,body,bodyPreview,organizer,attendees,start,end,location,cancelledOccurrences,exceptionOccurrences
According to example in official documentation for beta API you're missing $expand=exceptionOccurrences so your URL should be:
https://graph.microsoft.com/beta/me/events/AAMkADljY2EwNjU2LWVhYTItNDlmMy05ZWE1LTA5Zjc5YzhhZTMyYwBGAAAAAAAJYBHio4VlTKwYgFRcz_44BwC0bqbZ5NLFRoWa_zAJHejIAAAAAAENAABqBW9?$select=subject,body,bodyPreview,organizer,attendees,start,end,location,cancelledOccurrences,exceptionOccurrences&$expand=exceptionOccurrences
Note that current example in the official docs may still contain some editing errors (e.g. missing & that separates query string parameters).

External access settings for Office 365 groups

I'm trying to update GroupSettings of individual O365 Group, however I always get error
Resource 'guid' does not exist or one of its queried reference-property objects are not present.
A code I'm using to update the group settings
var graphResult = graphClient.GroupSettings[guid].Request().UpdateAsync(groupSetting).GetAwaiter().GetResult();
I've tried to use Group guid as well as GroupSettings guid, none of that worked.
I can set the settings for the first time (overwrite defaults) using codde below, but update doesn't work afterwards.
graphResult = graphClient.Groups[guid].Settings.Request().AddAsync(groupSetting).GetAwaiter().GetResult();
Any idea what can be wrong please?
Thanks
You should use GroupSettings guid here.
I can repro your issue when I use an incorrect guid here.
You should firstly use GET https://graph.microsoft.com/v1.0/groupSettings to find the GroupSettings guid of the GroupSetting you want to update.
Please note that you should include all the values in the request body even though you don't want to update some of them.
Then you could put it as the guid in your code.
It's stronly recommended to have a quick test in Microsoft Graph Explorer.
Since documentation doesn't say how to update settings for particular group, here it is: you need to use both IDs in call
graphResult = graphClient.Groups[groupGuid].Settings[settingsGuid].Request().UpdateAsync(groupSetting)

Missing updated property when using the delta query to track changes on users in Microsoft Graph API

I need to track changes in any property of any user but it is not working for all properties. Here is what I'm doing:
I query the list of users using that request:
https://graph.microsoft.com/v1.0/users/delta
I follow the link in #odata.nextLink then save the link in #odata.deltaLink.
I update the displayName property of a user in Office portal.
I follow the previously saved link. I can see the updated value of displayName among other basic properties of that user.
The problem is that if I do the same with the department property, the user is returned but the new department value is not included in the json.
In the documentation(https://developer.microsoft.com/en-us/graph/docs/concepts/delta_query_overview), it is said:
Updated instances are represented by their id with at least the
properties that have been updated, but additional properties may be
included.
which is not the case here.
I have also tested the jobTitle property which is not working at all, meaning that if I change its value, the delta link does not show any change at all. I suppose it is the same for many other properties..
Is there something I'm doing wrong?
I am able also to reproduce this issue. And event I specify select to display the department property, it still doesn't show in the changing result.
Based on the test, it seems that this property doesn't including in the track changes. If you have any idea or feedback about this REST, you can submit it from this link.

Change type of Datastore field to Text from String?

I can't seem to do this. The list that the app engine datastore viewer does not contain Text as an option. I had to change my fields because some of my values were too long for String, but now I can't retroactively fix my old entries.
To change the property type used by the old entities, you need to manually update each of them.
This can be easily and efficiently accomplished using the mapper API. This guide explains how to use this API.
You may also want to read this blog post by Nick Johnson.
You don't have to fix your old entries. The old ones should work as is, and the new ones just won't be indexed.
See
http://groups.google.com/group/google-appengine/browse_thread/thread/282dc825f9c46684 .

Resources