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)
Related
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
Built a google data studio 'community connector' for which only some of the data tables it can connect to require date range but others do not. For some reason the question of "date range required" is a per-connector config option. But I'd like to set the value differently depending on what other config options are set, such as the report selected.
Is there a way to setDateRangeRequired at schema time or later, for example, using a function which returns a different boolean depending on the request (getConfig doesn't get a request object -- too early)?
Seems like the kind of thing that should be set with setSchema instead, which can dynamically return different schemas depending on the config chosen by the user. PS - I know I can just ignore the date, but it seems like bad design to have a user select-able date that does nothing.
No, this is not currently possible.
Since dateRangeRequired is something that must be set for the getConfig response, there's no way to change it based on answers to the config.
I'm creating some custom queries and need to figure out the relation between Member Groups and Document Groups.
My ultimate goal is to display the resources belonging to a particular User Group when a user log in. I am able to get their User ID from Sessions and so the relations I have figured out so far are:
User ID -> Member Groups Table -> ??Unknown table that pairs Member Groups with Document Groups?? -> Document Groups Table- > Resources Table
I just cant find that missing table(s)!
If any one can help me out that would be awesome!
Thanks
(ps: using Revo)
EDIT: added image for assitance
You could use some of the built-in MODX methods to achieve this.
This is not tested and might not work, but this might be a way to do it:
// userGroups = membergroups
$userGroups = $user->getUserGroups();
foreach ($userGroups as $userGroup) {
$resGroups = $userGroup->getResourceGroups();
foreach ($resGroups as $resGroup) {
$resources = $resGroup->getResources();
// merge resources into an array or something
}
}
Check out moduser.class.php, modusergroup.class.php, and modresourcegroup.class.php to see the queries behind these methods. You might be able to adapt them to one more efficient query.
Also, if I haven't misunderstood what you want to achieve then your results should be similar to what a user would see in the resource tree in the manager when logged in?
That uses the resource/getnodes.class.php processor, which retrieves all possible resources for each context using getCollection, then loops through each and decides whether to display or not by using $resource->checkPolicy('list'). That might be another approach to consider.
I usually work with custom data rather than MODX resources so would be keen to hear how you get on with this.
I know this is really, really old, but I came across this question looking for the answer myself. After a bit more digging I've found that it's the access_resource_groups table that links document_groups and member_groups
document_groups.id = access_resource_groups.target
member_groups.id = access_resource_groups.principal
How to get the details of the deleted objects from Active directory using LDAP.
The deleted objects are stored in the separate container, to retrieve the objects have the look on this technet site.
It is the inbuilt feature and should have the operating system of Windows Server 2008 or higher.
*This answer comes from Rodney Anderson, contractor who sits next to me and happens to know AD quite well. He says email him with any questions you have (link provided)
Use dsquery.
http://support.microsoft.com/kb/258310 (LDAP Query)
...the other method is a DSquery from the command line using the following command you should be able to retrieve most attributes which remain in the tombstone (everything in one line): Just keep in mind that this query will not necessarily return all attributes which are preserved in a tombstone - some critical objects and changes of the list are hardcoded and will remain in the tombstone no matter what the searchflags state. This is the solution I used and it will take some tweaking for their domain.
dsquery * cn=schema,cn=configuration,dc=yourcomain,dc=com
-filter "(&(objectClass=AttributeSchema)(searchFlags:1.2.840.113556.1.4.803:=8))"
-scope subtree -attr name
On MSDN there is a nice article on finding tombstone objects in Active Directory using the .NET framework DirectorySearcher class.
Well unfortunately there isn't all that much data available from a deleted object. Only about enough data is retained to be able to replicate the deletion to other DC's from my experience. You can get what is available through System.DriectoryServices. Some of this seems to have to do with security and not wanting people to root around looking at old items.
To get the details of Deleted objects from active directory using LDAP server is before getting the details we should be aware of the administration limits.These administration limits are as such like InitRecvTimeout,MaxActiveQueries ,MaxConnections,MaxConnIdleTime,MaxPageSize,MaxPoolThreads,MaxQueryDuration,MaxValRange.
Once we get aware of the limits of the administration we should be able to Default the user setting.
After this go and view current policy setting...at the command prompt type LDAP setting press enter,then type in the connection and then once all the connection got displayed there and then see which all connection is not visible.This will make you known who all user are deleted at the LDAP.
You can use DirectorySearcher to list the Deleted objects with the Tombstone property set to true
using(DirectorySearcher srch = new DirectorySearcher(de))
{
//to return only deleted objects otherwise you can give any valid LDAP filter
srch.Filter = "isDeleted=TRUE";
// Instruct the DirectorySearcher to return deleted objects
srch.Tombstone = true;
srch.FindAll();
//...
}
Imagine you have a column called
usercreated = db.ReferenceProperty(User)
And you want this field to automaticly filled when first putted to store. Like this did for auto_date. Is this possible?
The User property type has an auto_current_user flag, which is an easy solution if your using google accounts for authentication.
http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#UserProperty
According to the docs, your best bet is going to be a redefinition of the property class you're working with in order to override the default_value() method. You could also try duckpunching, though it's probably not a viable option.