Create a login feature in Revit using a Microsoft account?

jonahHUSCT
Participant

Create a login feature in Revit using a Microsoft account?

jonahHUSCT
Participant
Participant

Has anyone tried the login feature with a Microsoft account in Revit? I'm trying and using Microsoft.Identity.Client to do it, and when I run the test, I get an error: "Could not load file or assembly 'Microsoft.Identity.Client, Version=4.58.1.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The system cannot find the file specified."

jonahHUSCT_0-1704620983175.png

This is my code get that error:

jonahHUSCT_1-1704621076042.png

Has anyone encountered a similar situation as above? and how to fix it? Many thanks.

0 Likes
Reply
286 Views
2 Replies
Replies (2)

moturi.magati.george
Autodesk
Autodesk

Hi @jonahHUSCT,

This is not in any way related to Revit API and hence you might not be assisted as expected. 

But you could look at your .csproj file to verify that you include the package mentioned above.

  Moturi George,     Developer Advocacy and Support,  ADN Open
0 Likes

franciscopossetto
Advocate
Advocate

Hey Johan,

Probably you've already checked this, but here's what I would do:
1. Ensure the necessary DLL, Microsoft.Identity.Client, is being copied to the add-in directory if necessary.
2. Verify the DLL's path in your project file. Also, check the properties of the reference to Microsoft.Identity.Client in your project and ensure "Copy Local" is set if needed.
3. Confirm that the version of Microsoft.Identity.Client you are using matches the version referenced in your project.
4. Clean and rebuild.

If everything looks good and the problem persists, I would try a different version of the Microsoft.Identity.Client library. 

Good luck!



Github:
https://github.com/franpossetto
0 Likes