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

fragment is not present issue. #7292

Open
2 tasks
yogeshwakle99 opened this issue Sep 4, 2024 · 0 comments
Open
2 tasks

fragment is not present issue. #7292

yogeshwakle99 opened this issue Sep 4, 2024 · 0 comments
Labels
bug-unconfirmed A reported bug that needs to be investigated and confirmed confidential-client Issues regarding ConfidentialClientApplications msal-browser Related to msal-browser package msal-react Related to @azure/msal-react Needs: Attention 👋 Awaiting response from the MSAL.js team question Customer is asking for a clarification, use case or information.

Comments

@yogeshwakle99
Copy link

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

3.22.0

Wrapper Library

MSAL React (@azure/msal-react)

Wrapper Library Version

2.0.22

Public or Confidential Client?

Confidential

Description

The request has returned to the redirectUri but a fragment is not present. It's likely that the fragment has been removed or the page has been redirected by code running on the redirectUri page i got the issue

Error Message

The request has returned to the redirectUri but a fragment is not present. It's likely that the fragment has been removed or the page has been redirected by code running on the redirectUri page i got the issue

MSAL Logs

async function handleMicrosoftLogin() {
try {
const loginRequest = {
scopes: ["user.read"],
};
const response = await instance.loginPopup(loginRequest);
console.log('Login successful!', response);
const accessToken = response.accessToken;

        const result = await microsoftAuthToken({
            accessToken: accessToken,
            time_zone: Intl.DateTimeFormat().resolvedOptions().timeZone
        });
        console.log('Result is:', result);
    } catch (e) {
        console.error('Login failed:', e);
    }
}

Network Trace (Preferrably Fiddler)

  • Sent
  • Pending

MSAL Configuration

const msalConfiguration: Configuration = {
        auth: {
            clientId:appConfig.microsoft_ClientID,
            redirectUri:'http://localhost:5173',
            authority:"https://login.microsoftonline.com/7ee0f2bd-fdaa-4379-920a-17480e38f392"
        },
        cache: {
            cacheLocation: "localStorage", 
            storeAuthStateInCookie: false, 
        },
        system: {	
            loggerOptions: {	
                loggerCallback: (level, message, containsPii) => {	
                    if (containsPii) {		
                        return;		
                    }		
                    switch (level) {
                        case LogLevel.Error:
                            console.error("Error======>>>>>>",message);
                            return;
                        case LogLevel.Info:
                            console.info("Info=====++>>>>>>",message);
                            return;
                        case LogLevel.Verbose:
                            console.debug("Verbose====>>>>>",message);
                            return;
                        case LogLevel.Warning:
                            console.warn("Warning=====>>>>>>>",message);
                            return;
                        default:
                            return;
                    }	
                }	
            }	
        }
    };

Relevant Code Snippets

async function handleMicrosoftLogin() {
        try {
            const loginRequest = {
                scopes: ["user.read"],
            };
            const response = await instance.loginPopup(loginRequest);
            console.log('Login successful!', response);
            const accessToken = response.accessToken;

            const result = await microsoftAuthToken({
                accessToken: accessToken,
                time_zone: Intl.DateTimeFormat().resolvedOptions().timeZone
            });
            console.log('Result is:', result);
        } catch (e) {
            console.error('Login failed:', e);
        }
    }

Reproduction Steps

after click on mail then it shows the error

Expected Behavior

.

Identity Provider

Entra ID (formerly Azure AD) / MSA

Browsers Affected (Select all that apply)

Chrome

Regression

No response

Source

Internal (Microsoft)

@yogeshwakle99 yogeshwakle99 added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels Sep 4, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Sep 4, 2024
@github-actions github-actions bot added confidential-client Issues regarding ConfidentialClientApplications msal-browser Related to msal-browser package msal-react Related to @azure/msal-react labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed A reported bug that needs to be investigated and confirmed confidential-client Issues regarding ConfidentialClientApplications msal-browser Related to msal-browser package msal-react Related to @azure/msal-react Needs: Attention 👋 Awaiting response from the MSAL.js team question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests

1 participant