Skip to content

[Bug] msalruntime not embed in ClickOnce #5052

Closed
@liszto

Description

Library version used

Azure.Idenity 1.3.0 with following dependancies
-> Microsoft.Identity.Client 4.22.0
-> Microsoft.Identity.Client.Extension.Msal 2.16.5
Microsoft.Indentity.Client.Broker 4.66.2 with following dependancies
-> Microsoft.Identity.Client 4.66.2
-> Microsoft.Indentity.Client.Nativeinterop 0.16.2

.NET version

.NET Framework 4.8

Scenario

PublicClient - desktop app

Is this a new or an existing app?

The app is in production, I haven't upgraded MSAL, but started seeing this issue.
We "didn't update MSAL" but we recently integrated the Broker lib. which seems to lead to this issue

Issue description and reproduction steps

Hello,
in our internal product, we used MSAL for credentials purpose.
Recently, we started to migrate from the browser interactive system to the Broker one.

During all our test in Visual Studio we encountered not a single issue and everything is working. But as soon as we tried to make some test in production environment (so deployment on our server with clickonce), we noticed that our software stays freeze during its starting phase.
When we check on the machine the .IdentityService in "AppData/Local" we can see an infinite attempt of creation on our local msal cache. (looping between ourfile.lock / ourfile.test and then removing them and start again)

We noticed something odd :

  • When we look at our local build files we see a "msalruntime.dll" in our project BUT in the project built and deployed through ClickOnce this file seems to be missing... We supposed the issue come from this, any hint on a possible bug ?

We probably could attempt something ugly by copy/paste the needed dll (which is the one from "native/win-x64/msalruntime.dll") inside our project to enforce it into clickonce (I supposed) but if we can get a clean solution it would be great...

Relevant code snippets

No response

Expected behavior

Having something working through the current system using Broker instead of embedded browser.

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions