0

I am working on a project where I need to migrate some of the Infopath forms manually from SharePoint 2013 to SharePoint Online. I have developed Console application to achieve this and it worked for other columns except UserField. Becuase Infopath's XML file is having a userentry as domain\username and I need to convert it to SharePoint online user like username@abc.com..

I am not sure if this is achievable or not?

Any help is appreciated.

Thanks

Sigar Dave
  • 2,598
  • 1
  • 20
  • 42
  • Not sure how you would achieve this in your console application but when we migrated up to SPO, we had to use a mapping .csv file that would map the on prem domain\username to the users UPN. Maybe you can look up to the mapping file using your console application and grab the UPN. – Brian Smith Aug 01 '18 at 15:36
  • Thanks Brian, did you generated the mapping file manually? or using some tool? – Sigar Dave Aug 02 '18 at 04:56
  • My part was only the migration, I was given the file from our team over Active Directory. Sorry, I am not sure how it was generated. I sure there are many ways out there and here is an example using c#. But instead of console.writeline, write it to an object then to csv. https://stackoverflow.com/a/5163820/6559330 – Brian Smith Aug 02 '18 at 12:29

1 Answers1

0

About how to create user in SharePoint Online using C# code, Here are two solutions for your reference.

  1. We can use the Microsoft Graph API to create User:

    Graph API create User

  2. We can use Powershell and call it in our C# code to achieve this:

    Office 365: Manage users by calling Windows PowerShell cmdlets from C#

In addition, we can do sync on-premises directories: Integrate your on-premises directories with Azure Active Directory

Hope this is helpful to you

Lee Liu
  • 1,981
  • 1
  • 12
  • 13