Azure-docs: UserProfile.json

Created on 30 Oct 2019  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-docs

Hi,
Could you explain a little more how that file "UserProfile.json " is supposed to be generated ?
"UserMigration.exe 3 {email address}" returns the information but not in JSON
Many thanks
Kev


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

B2subsvc Pri2 active-directorsvc assigned-to-author product-question triaged

All 6 comments

@KevUdeM Thanks for your feedback! We will investigate and update as appropriate.

Hello @KevUdem this information can be found in the repo here :
https://github.com/azure-ad-b2c/user-migration/tree/master/pre-migration

In particular the usermigration.exe code is found in program.cs on the line below.
https://github.com/azure-ad-b2c/user-migration/blob/master/pre-migration/source-code/AADB2C.UserMigration/Program.cs#L47

It essentially sends a Microsoft Graph call checking if the user exists against the AAD tenant. This call can be found here : https://github.com/azure-ad-b2c/user-migration/blob/65d7bc99d4c0c5c70a3692173e44a808dc719201/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs#L120

Assuming that you've built your premigration .exe file properly it should work. Did you use the correct AAD App registration for the client ID and client secret for the right tenant?

Many thanks for your help
Yes I am able to create users , everything is working fine
I am also able to return user information when using : UserMigration.exe 3 {email address} , the output is directly in the CMD window
Maybe I am missing something , but at the next step, the doc says : "Open the UserProfile.json file in a JSON editor to see user's information" , I assume that file should be generated at the previous step , but cannot find it ...

Hey @KevUdeM I see, I believe that there is an inconsistency between the docs and the program. It should be printing out to the console the json, which you should be able to copy and save into a .json file to properly utilize.

I'm going to go ahead and engage some more people in regards to this to try to work to determine how to fix this in the docs or the b2c premigration tool.

I apologize for the confusion, and thank you for providing your feedback in regards to this issue.

cc: @mmacy

@KevUdeM The console application sends its output to STDOUT by default. You should be able to redirect the output to a file as such:

UserMigration.exe 3 {email address} > UserProfile.json

I'll update the command in the article to include redirection of output to a file.

@mmacy @FrankHu-MSFT , thank you both for your help
That's what I was thinking but wanted to be sure I was not missing something
thanks again

Was this page helpful?
0 / 5 - 0 ratings