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
Related
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)
I am not able to get removed users using a delta link retrieved from a previous call of https://graph.microsoft.com/v1.0/groups/delta
Explanations:
I retrieve the groups using the query
https://graph.microsoft.com/v1.0/groups/delta
which returns the results correctly
Then I keep the delta link
(example of delta link from JSON response: "#odata.deltaLink": "https://graph.microsoft.com/v1.0/groups/delta?$deltatoken=7VBZ66f3HT ...
)
I remove manually a user which belongs to a group to be sure the delta link works and returns the removed user id.
-> nothing at all is returned.
According to their documentation, it should work:
https://learn.microsoft.com/en-us/graph/delta-query-groups#deltalink-response
Moreover, when i do the same thing with delta user query, it works fine, the removed user is returned with user delta link.
Question:
Does anyone is experiencing this issue and did you find any solution?
I didn't reproduce your issue on my side. I am using Microsoft graph explore to test the api.
When I accessed the final nextLink response, I got the deltaLink.
Then I removed two users from a group on Azure portal.
I can get the expected result when I access the deltaLink.
Update:
I just noticed that you deleted the user directly. That's why you can only get removed user on user delta. If you remove the user from the group directly, you will get the removed user.
How can I get all users properties like (email, address, phone and etc..)
using search filter syntax?
Can't find anything in the docs.
I tried this
(&(objectCategory=person)(objectClass=user)(cn=Erika Wynn))
but all I get is the dn details :
CN=Erika Wynn,CN=Users,DC=****,DC=local
I wish to get all user fields General (telephone, email..), Address (Street, City), Organization.
LDAP allows you to specify which attributes you want to receive. If you do not specify anything, Active Directory will return every attribute that has a value. So if it is not doing that in your case, then there must be some part of the code that has set the list of attributes to only the distinguishedName.
You will have to show your code for us to help you more. You can update your question to include your code.
I should of just provide a user name similar to AD login, as a filter and any attribute I needed to get.
I used this great article, to get all the different attributes that you can fetch from Active Directory.
https://www.manageengine.com/products/ad-manager/help/csv-import-management/active-directory-ldap-attributes.html
this is the query:
filter=(sAMAccountName=username) attributes=cn,department,company,streetAddress,L,st,co,mail
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.
I am trying to make a batch update to Salesforce as part of a data masking project and am getting the error INVALID_FIELD_FOR_INSERT_UPDATE when I try updating fields of a particular custom object via API.
Our custom object has a few standard fields and a few custom fields. The custom fields are what I'm trying to update but I keep getting denied.
Each field that I'm trying to update is either Long Text Area(32768) or Text(255). There are no lookups, controlling fields, validation rules, nor are there field dependencies.
I am able to make modifications to other objects (Account for example) via the masking process. I am also able to make modifications to the values through the web UI on the values for this custom object.
I've tried as members of the API group as well as System Administrator.
Can anyone please point me in the right direction? I don't have access to the source code of the masking tool, but I do have elevated rights in SF.
Thanks in advance for your advice.
The exact error:
INVALID_FIELD_FOR_INSERT_UPDATE Error message: Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile or permission set.
The funny thing is that I'm not trying to update the field "Name". Name seems to be an auto-number field on the object, but I'm not sure why this field would change value on an update to a different column.
If some one facing the same issue of not able to update the Name column because it has data type as Name.
There are 2 solutions:
If you want to push the name of human then try pushing FirstName and LastName instead. "Name" will get populated automatically.
If you want to push the name of a product then try changing the type of Name field to Text. If that doesn't work then you can push the name to either FirstName or LastName, whichever is mandatory(Just A work around).