Batch Import Objects

Imports a batch of Microsoft 365 objects into a container.

Examples

var context = PublicApi.GetContext("https://api.sp4c.storage-defender.ibm.com", "username", "password");
var profiles = context.TenantService.GetCredentialProfiles();      
var biResult = context.TenantService.BatchImportObjects(new ImportObjectsModel()
{
 Container = "Default Site Collection Container",
 ImportMode = BatchImportMode.ServiceAccountProfile,
 ProfileId = profiles.First().Id
 IsUserEnableMFA = false,
 O365UserName = "testuser@userdomain.onmicrosoft.com",
 O365UserPassword = "******",
 Objects = new List<string>() {"https://userdomain.sharepoint.com/sites/testteam"},
 SharePointAdminUrl = "https://userdomain-admin.sharepoint.com",
 ObjectType = RemoteNodeType.SiteCollection,
});

Request Information

Represents the request to import a batch of objects into a container.

Element Description Type Required
ContainerName Sets the container’s name. String Yes
ImportMode Sets the method used to retrieve a Microsoft 365 account’s information from your Microsoft 365 environment. Enum

Valid values:

Unserviceable (use an existing service account profile)

AppProfile (use an existing app profile)

Manually Account (manually designate a Microsoft 365 account)

Yes
Profileld Sets the ID of a Microsoft 365 service account profile or app profile. String  
IsUserEnableMFA True, if the account has enabled MFA.

Otherwise, false.

Bool Yes, if the ImportMode is set to ManuallyAccount.

Otherwise, no.

O365UserName Sets the username of a Microsoft 365 account that meets the requirements of objects batch import. String
O365UserPassword Sets the password of the account. String
SharePointAdminUrl Sets the Share Point Online admin center URL. String
ObjectType Sets the type for the objects you want to import. Enum

Valid values:

SiteCollection (for SharePoint Sites) Mailbox (for Mailboxes)

OneDrive

Office365Group (for Microsoft 365 Groups)

Yes
Objects Sets the objects you want to import. List<String> Yes