# Retrieve User and Group Information

To retrieve users and groups using OmniGroupServer, follow these steps.

To retrieve security groups

1. Open the OmniGroupServer configuration file.

2. In the `[Repositories]` section, create the following repositories to store the users and groups:

   - A repository to retrieve information from OneDrive through the OneDrive connector. If you are processing a single OneDrive user account, this is the only repository you need to create.
   - (OneDrive for Business only) A repository to retrieve user and group information from Azure Active Directory.
   - (OneDrive for Business only) A repository that combines the information from both sources. If you are processing drives in a OneDrive for Business environment, this is the only repository that should be queried by your IDOL Community component.

   For example:

       [Repositories]
       Number=3
       0=OneDriveConnector
       1=AzureAD
       2=OneDrive

3. Create a new section and configure a task to obtain information through the OneDrive Connector. You can use the following configuration parameters (for a complete list of configuration parameters, refer to the OmniGroupServer Reference).

   `GroupServerJobType` | The type of task to run. To retrieve group information through a connector, set this parameter to `Connector`. OmniGroupServer will send the `SynchronizeGroups` action to your OneDrive Connector.
   `ConnectorHost` | The host name or IP address of the machine that hosts the OneDrive Connector.
   `ConnectorPort` | The ACI port of the OneDrive Connector.
   `ConnectorTask` | The name of the fetch task in the connector's configuration file that contains the information and credentials required to obtain the group information from the OneDrive repository.

   For example:

       [OneDriveConnector]
       GroupServerJobType=Connector
       ConnectorHost=10.0.0.1
       ConnectorPort=7036
       ConnectorTask=MyTask

4. (OneDrive for Business only) Create a new section and configure a task to retrieve user and group information from Azure Active Directory.

   `GroupServerLibrary` | Set this parameter to `ogs_azure`.
   `MicrosoftGraphApiUrl` | The base URL of the Microsoft Graph API. If your Azure Active Directory instance is single-tenant, you must specify your tenant ID in place of "common".
   `UseIDs` | Specifies whether to store users and groups in OmniGroupServer by their ID rather than by their name. Set this parameter to `TRUE`.

   For example:

       [AzureAD] < "oauth.cfg" [OAUTH]
       GroupServerLibrary=ogs_azure
       MicrosoftGraphApiUrl=https://graph.windows.net/common/
       UseSystemProxy=true
       SSLMethod=negotiate
       UseIDs=TRUE

   NOTE: The file `oauth.cfg` is generated by the OAuth configuration tool that is supplied with OmniGroupServer. For information about how to use the OAuth configuration tool and generate `oauth.cfg`, refer to the IDOL Document Security Administration Guide.

5. (OneDrive for Business only) Create a new section and configure a task to combine information from both sources. For example:

       [OneDrive]
       GroupServerJobType=Combine
       GroupServerSections=AzureAD,OneDriveConnector
       GroupServerStartDelaySecs=10

6. Save and close the OmniGroupServer configuration file.

7. Start OmniGroupServer. The tasks run according to the scheduling options in the configuration file, or you can start retrieving the user and group information immediately by sending the `StartJob` action. For example:

       http://group-server:3057/action=StartJob&Repository=OneDriveConnector
       http://group-server:3057/action=StartJob&Repository=AzureAD

_FT_HTML5_bannerTitle.htm