Skip to content

Outlook Classic event activation fails with msal NAA v5 #8412

@dariussantaras

Description

@dariussantaras

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

5.4.0

Wrapper Library

Not Applicable

Wrapper Library Version

None

Public or Confidential Client?

Public

Description

With msal-browser v5, Outlook classic event-based activation fails when trying to get a nested app authentication token.
Other Outlook clients work fine, so this is an issue with accessing functions that are not available in Outlook classic js runtime (https://learn.microsoft.com/en-us/office/dev/add-ins/testing/runtimes)

Error Message

The error is:
Cannot read properties of undefined (reading 'getRandomValues')

MSAL Logs

No response

Network Trace (Preferrably Fiddler)

  • Sent
  • Pending

MSAL Configuration

{
	auth: {
		clientId: applicationId,
		authority: 'https://login.microsoftonline.com/common',
	},
}

Relevant Code Snippets

console.log('Creating AuthService instance');
		const pca = await createNestablePublicClientApplication({
			auth: {
				clientId: applicationId,
				authority: 'https://login.microsoftonline.com/common',
			},
			system: {
				loggerOptions: {
					logLevel: LogLevel.Trace,
					loggerCallback: (level, message, containsPii) => {
						if (containsPii) {
							return;
						}
						switch (level) {
							case LogLevel.Error:
								console.error(message);
								return;
							case LogLevel.Info:
								console.info(message);
								return;
							case LogLevel.Verbose:
								console.debug(message);
								return;
							case LogLevel.Warning:
								console.warn(message);
								return;
							default:
								console.log(message);
								return;
						}
					},
				},
			},
		});
		console.log('did not get to this part');

Reproduction Steps

  1. Have an event activated Outlook add-in with msal-browser v5
  2. Open outlook classic, draft an email
  3. Notice an error

Expected Behavior

The msal library should not attempt to get at functions not available at runtime

Identity Provider

Entra ID (formerly Azure AD) / MSA

Browsers Affected (Select all that apply)

Other

Regression

@azure/msal-browser 4.29.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-unconfirmedA reported bug that needs to be investigated and confirmedmsal-browserRelated to msal-browser packagemsal-v5no-issue-activityIssue author has not responded in 5 dayspublic-clientIssues regarding PublicClientApplicationsquestionCustomer is asking for a clarification, use case or information.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions