Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSAL SDK with Apple's Concurrency Model #2526

Open
jukemoon opened this issue Feb 24, 2025 · 1 comment
Open

MSAL SDK with Apple's Concurrency Model #2526

jukemoon opened this issue Feb 24, 2025 · 1 comment
Assignees

Comments

@jukemoon
Copy link

I am running into issues trying to use the MSAL SDK with Apple's concurrency model. Please see the attached screenshots and information. Please advise if there is a way to use the acquireTokenSilentWithParameters and acquireTokenWithParameters.

Runtime Warning Displayed

Thread running at User-Initiated quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class. Investigate ways to avoid priority inversions.

Image
Image

Troubleshooting

I have tried various fixes, including wrapping the acquireTokenSilent (and Interactive) in DispatchQueue’s, and creating structures for have a “Sendable” for us MSALSilentTokenParameters and MSALInteractiveTokenParameters. Which then creates the warning – “Stored property 'parameters' of 'Sendable'-conforming struct 'SendableMSALSilentTokenParameters' has non-sendable type 'MSALSilentTokenParameters'; this is an error in the Swift 6 language mode”

Image


Thoughts?

@antonioalwan antonioalwan self-assigned this Feb 28, 2025
@antonioalwan
Copy link
Contributor

Hi @jukemoon, thanks for reaching out.
Your code seems blocking "quality-of-service" thread (basically thread that is responsible for ui, animation etc) in low level (background) thread (that we use in silent acquire token). Do you mind trying acquireTokenSilent without using async/await.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants