Skip to content

Branding logo not visible due to Content-Security-Policy (CSP) on consent screen #7689

Open
@kdeshpande-methodcrm

Description

@kdeshpande-methodcrm

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

2.5.2

Wrapper Library

Not Applicable

Wrapper Library Version

None

Public or Confidential Client?

Public

Description

The branding logo does not display on the consent screen.

Image

Image

Error Message

Refused to load the image 'https://secure.aadcdn.microsoftonline-p.com/firstID/appbranding/secondID/thirdID/bannerlogo?ts=fourthID' because it violates the following Content Security Policy directive: "img-src 'self' https://logincdn.msauth.net https://logincdn.msftauth.net https://lgincdnvzeuno.azureedge.net https://lgincdnmsftuswe2.azureedge.net https://acctcdn.msauth.net https://acctcdn.msftauth.net https://*.microsoft.com https://*.office.net https://*.bing.com https://*.sharepointonline.com https://js.monitor.azure.com https://aadcdn.msftauthimages.net https://aadcdn.msauthimages.net https://*.live.com 'report-sample'".

MSAL Logs

No response

Network Trace (Preferrably Fiddler)

  • Sent
  • Pending

MSAL Configuration

const msalConfig = {
    auth: {
        clientId: 'a2ebf4f9-5f2c-4b95-9d9f-7c641d3fa593',
        authority: "https://login.microsoftonline.com/common",
        redirectUri: 'https://emailgadget.methodwarehouse.com/OutlookGadget/Project_Readme.html'
    },
    cache: {
        cacheLocation: "localStorage",
        storeAuthStateInCookie: true,
    },
    system: {
        iframeHashTimeout: 10000
    }
};

Relevant Code Snippets

const msalInstance = new msal.PublicClientApplication(msalConfig);
const username = _mailbox.userProfile.emailAddress;
const silentRequest = {
    scopes: ["User.Read", "openid", "profile", "offline_access"],
    loginHint: username
};
    msalInstance.ssoSilent(silentRequest).then(
        (accessTokenResponse) => {
            // Acquire token silent success
        },(fail) =>{ // handle fallback to NAA (being used in outlook addin)});

Reproduction Steps

Just redirect to consent screen. Image has already been uploaded in description section

Expected Behavior

Should display the branding logo

Identity Provider

Entra ID (formerly Azure AD) / MSA

Browsers Affected (Select all that apply)

Chrome

Regression

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention 👋Awaiting response from the MSAL.js teambug-unconfirmedA reported bug that needs to be investigated and confirmedmsal-browserRelated to msal-browser packagepublic-clientIssues regarding PublicClientApplicationsquestionCustomer is asking for a clarification, use case or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions