หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Applies to: Microsoft 365 Global Administrator or Organizational Data Source Administrator or Human Resources Information System admin
1. Prepare and export your data on a set frequency
Export organizational data for all employees in the company and add all fields you want to import in a .csv template or an automated .csv output in an external source like Workday Enterprise Interface Builder (EIB).
At the frequency you decide (such as once a month or once a week), have your custom app or external source integration export organizational data from your source system.
2. Call the API to import your data
To import your data to Microsoft 365, you can pick from one of five options:
Use our API to build a custom app that exports and imports your data at the frequency you choose. Learn how.
Run our C# Upload solution on your console, which is based on our API. Learn how.
Run our PowerShell Upload script, which is also based on our API. Learn how.
Use an Azure Data Factory template to send data to the API-based import. Learn how.
Run our PowerShell script to retrieve OAuth tokens. Then, use those tokens to send data directly from an external source like Workday to the API-based import. Learn how.
Note
Our C# and PowerShell solutions only import data to Microsoft 365 Organizational Data Service. They don't export data from your source system.
Make sure you have this information:
App (client) ID: Find this ID in the registered app information in the Microsoft Entra admin center under Application (client) ID.
Microsoft Entra tenant ID: Find this ID in the registered app information in the Microsoft Entra admin center under Directory (tenant) ID.
Connector ID: This is the string at the end of the URL that appears when you select your API-based connector in the Microsoft 365 admin center, such as
https://admin.cloud.microsoft/?#/featureexplorer/migration/M365OrganizationalDataService/connection-details/[Connector ID here].
In addition, if you're working with option 1, 2, 3, or 4, make sure you have this information:
Client secret: This is a secret string that the application uses to prove its identity when requesting a token. It's also referred to as application password. This secret is only shown for the first time when the client secret is created. To create a new client secret, follow these steps.
Certificate name. This name is configured in your registered application. After you upload the certificate, the certificate name shows up under Description in the Azure Portal.
The .csv file and the path to the .csv file.
Or, if you're working with option 5, make sure you have this additional information:
- Client secret: This is a secret string that the application uses to prove its identity when requesting a token. It's also referred to as application password. This secret is only shown for the first time when the client secret is created. To create a new client secret, follow these steps.
Push data
App to call Microsoft 365 API to push content
[POST] https://orgdata.svc.cloud.microsoft/v1.0/dataUpload/HR/ingestions/fileIngestion?connectorId={connectorId}
In case connector isn't set up:
403: Forbidden
Note
If there are data validation failures, the upload will succeed but validation failure details will be visible on the API-based connector page in the Microsoft 365 admin center.
Make sure the App ID configured in the API-based connector matches the App ID used in your preferred solution below.
Option 1: Use the Microsoft 365 API to build a custom import/export app
You can use the Microsoft 365 API to build a custom app that automatically exports data from your source system, and then imports it to the Microsoft 365 admin center.
Your app can take any form, like a PowerShell script, but it needs to export your source data as a .csv file at the frequency you pick, and import that file into Microsoft 365 apps and services.
Option 2: Import data through our C# solution after exporting data through your custom app
After you've exported your source data as a .csv file at the frequency you pick, you can run the OrganizationalDataUploadApp C# solution on the console. The OrganizationalDataUploadApp C# solution then brings your locally stored data into Microsoft 365. See the solution on GitHub.
To run the solution:
Make sure you've installed Microsoft .NET 10 SDK or newer.
Clone this app to your machine by running the following command on the command line:
git clone https://github.com/microsoft/orgdata_apibasedimport.git.Navigate to and run the C# Upload solution:
cd.\orgdata_apibasedimport\C#_Upload_Solution\OrganizationalDataUploadApp\dotnet run.\OrganizationalDataUploadApp.csprojEnter the required information listed above.
Option 3: Import data through our PowerShell solution after exporting data through your custom app
Similar to option 2, after you've exported your source data as a .csv file at the frequency you pick, you can run the OrganizationalDataUpload PowerShell solution on the console. The OrganizationalDataUpload PowerShell solution then brings your locally stored data into Microsoft 365. See the solution on GitHub.
Download this PowerShell script.
Open a new PowerShell window as an administrator.
In your PowerShell window, run the following command:
Install-Module -Name MSAL.PSOr, go to this PowerShell gallery link for instructions on installation.
Navigate to and run the PowerShell Upload solution using the required information listed above:
cd path/to/folder.\OrganizationalDataUpload.ps1 -AppId "YOUR-APP-ID" -FilePath "C:\your\file\path\data.csv" -TenantId "YOUR-TENANT-ID" -ConnectorId "YOUR-CONNECTOR-ID" -ClientSecret "YOUR-CLIENT-SECRET"or:
.\OrganizationalDataUpload.ps1 -AppId "YOUR-APP-ID" -FilePath "C:\your\file\path\data.csv" -TenantId "YOUR-TENANT-ID" -ConnectorId "YOUR-CONNECTOR-ID" -CertificateName "YOUR-CERTIFICATE-NAME"