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

[QUERY] Interactive Browser Change with Version 1.10 of Azure.Identity #38431

Closed
scottbright22 opened this issue Aug 30, 2023 · 5 comments · Fixed by #38449
Closed

[QUERY] Interactive Browser Change with Version 1.10 of Azure.Identity #38431

scottbright22 opened this issue Aug 30, 2023 · 5 comments · Fixed by #38449
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@scottbright22
Copy link

scottbright22 commented Aug 30, 2023

Library name and version

Azure.identity 1.10

Query/Question

Version 1.9 was able to use interactive browser credentials and cache the authorization record.
Version 1.10 asks to re-enter the password every time.

    '--------------------------------------------------------
    'Application Code:
    '--------------------------------------------------------
    '// Load the previously serialized AuthenticationRecord from disk And deserialize it.
    Using authRecordStream = New IO.FileStream(AuthFile_Name_and_Path, IO.FileMode.Open, IO.FileAccess.Read)
        'authRecord = await Azure.Identity.AuthenticationRecord.DeserializeAsync(authRecordStream)
        _auth = Azure.Identity.AuthenticationRecord.Deserialize(authRecordStream)
    End Using

    '// Construct a New client with our TokenCachePersistenceOptions with the addition of the AuthenticationRecord property.
    '// This tells the credential to use the same token cache in addition to which account to try And fetch from cache when GetToken Is called.
    Dim _tcpo As New Azure.Identity.TokenCachePersistenceOptions
    _tcpo.Name = TOKEN_CACHE_NAME
    Dim _ibcredopts As New Azure.Identity.InteractiveBrowserCredentialOptions
    _ibcredopts.TokenCachePersistenceOptions = _tcpo
    _ibcredopts.AuthenticationRecord = _auth

    'Dim _bcos As New Identity.BrowserCustomizationOptions
    '_bcos.UseEmbeddedWebView = True 'False use Chrome, True used built in
    '_ibcredopts.BrowserCustomization = _bcos

    _ibc = New Azure.Identity.InteractiveBrowserCredential(_ibcredopts)
    Dim _TokenReqContext = New Core.TokenRequestContext(New String() {"https://batch.core.windows.net" & "/.default"})

    '*******************************************************************************************************
    'PROBLEM
    '*******************************************************************************************************
    Dim _AccessToken As Core.AccessToken = _ibc.GetToken(_TokenReqContext, Nothing) '==Version 10 causes browser window to open every time now
    '*******************************************************************************************************

Environment

.Net Framework 4.8

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 30, 2023
@scottbright22
Copy link
Author

I see that the cache file name now gets a .cae or .nocae on the end with version 10. Do we have to program for that?

@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Azure.Identity needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Aug 31, 2023
@jsquire
Copy link
Member

jsquire commented Aug 31, 2023

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@christothes
Copy link
Member

This is a bug - we should have a fix available soon. Sorry for the inconvenience!

@scottbright22
Copy link
Author

No problem! It's nice to know we might know what we are doing.

@christothes
Copy link
Member

As a side note - the silent auth should work after the first GetToken request. The bug is that we don't properly recognize that the cache is already populated on a new instance of the credential.

@joshfree joshfree moved this from Untriaged to Not Started in Azure Identity SDK Improvements Aug 31, 2023
@joshfree joshfree added this to the 2023-10 milestone Aug 31, 2023
@github-project-automation github-project-automation bot moved this from Not Started to Done in Azure Identity SDK Improvements Sep 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Development

Successfully merging a pull request may close this issue.

4 participants