Merge pull request #28939 from Sarabadu/sarabadu/mgraphs-provider-paths
feat(msgraphOrgProvider): add the path options to allow querying users and group from different endpoints
This commit is contained in:
@@ -125,6 +125,8 @@ microsoftGraphOrg:
|
||||
In addition to these groups, one additional group will be created for your organization.
|
||||
All imported groups will be a child of this group.
|
||||
|
||||
By default the provider will get groups using the msgraph `/group` endpoint, but it is possible to use different endpoints by setting the `path` configuration. All the endpoint containing `/microsoft.graph.group` will return the right type of group object. [See usage](#Using-path-parameter) for more details.
|
||||
|
||||
### Users
|
||||
|
||||
There are two modes for importing users - You can import all user objects matching a `filter`.
|
||||
@@ -148,6 +150,36 @@ microsoftGraphOrg:
|
||||
search: '"description:One" AND ("displayName:Video" OR "displayName:Drive")'
|
||||
```
|
||||
|
||||
By default the provider will get user using the msgraph `/user` endpoint, but it is possible to use different endpoints by setting the `path` configuration. All the endpoint containing `/microsoft.graph.user` will return the right type of user object. [See usage](#Using-path-parameter) for more details.
|
||||
|
||||
### Using `path` parameter
|
||||
|
||||
By default the provider will get groups and users using the msgraph `/group` and `/user` endpoints, but it is possible to use different endpoints by setting the `path` configuration.
|
||||
All the endpoint containing `/microsoft.graph.user` will return the right type of user object and all the endpoint containing `/microsoft.graph.group` will return the right type of group object.
|
||||
|
||||
#### Example
|
||||
|
||||
Given the following org structure it is possible to use the `path` parameter to get all the users and groups that are members of the group `someRootGroup` on all levels.
|
||||
|
||||
<div align="center">
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
The configuration would look like this:
|
||||
|
||||
```yaml
|
||||
microsoftGraphOrg:
|
||||
providerId:
|
||||
group:
|
||||
path: /groups/{someRootGroup id}/transitiveMembers/microsoft.graph.group
|
||||
user:
|
||||
path: /groups/{someRootGroup id}/transitiveMembers/microsoft.graph.user
|
||||
```
|
||||
|
||||
Using the transitive members endpoint will return all the users and groups that are members of the group `someRootGroup` on all levels.
|
||||
|
||||
### User photos
|
||||
|
||||
By default, the photos of users will be fetched and added to each user entity. For huge organizations this may be unfeasible, as it will take a _very_ long time, and can be disabled by setting `loadPhotos` to `false`:
|
||||
|
||||
Reference in New Issue
Block a user