The vue-msal encountered issues resolving endpoints. Please verify your network connection and try again. Additional information: function toArrayString() { [native code] }

Error: Unable to resolve endpoints. Please verify your network connection and try again. Details: function toString() { [native code] } at ClientAuthError.AuthError [as constructor] (webpack-internal:///./node_modules/msal/lib-es6/error/AuthError.js:26:28) at new ClientAuthError (webpack-internal:///./node_modules/msal/lib-es6/error/ClientAuthError.js:111:28) at Function.ClientAuthError.createEndpointResolutionError (webpack-internal:///./node_modules/msal/lib-es6/error/ClientAuthError.js:121:16) at eval (webpack-internal:///./node_modules/msal/lib-es6/UserAgentApplication.js:465:125) VM11105:1 GET

Error: Unable to resolve endpoints. Please verify your network connection and try again. Details: function toString() { [native code] }
    at ClientAuthError.AuthError [as constructor] (webpack-internal:///./node_modules/msal/lib-es6/error/AuthError.js:26:28)
    at new ClientAuthError (webpack-internal:///./node_modules/msal/lib-es6/error/ClientAuthError.js:111:28)
    at Function.ClientAuthError.createEndpointResolutionError (webpack-internal:///./node_modules/msal/lib-es6/error/ClientAuthError.js:121:16)
    at eval (webpack-internal:///./node_modules/msal/lib-es6/UserAgentApplication.js:465:125)
VM11105:1 GET https://caatdevportal.onmicrosoft.com/caatdevportal.onmicrosoft.com/b2c_1a_signuporsignin/v2.0/.well-known/openid-configuration net::ERR_NAME_NOT_RESOLVED

Configuration error, unclear on the issue

Vue.use(MSAL, {
  auth: {
    clientId: "**************************",
    redirectUri: "https://localhost:44390",
    tenantId: "devportal.onmicrosoft.com/B2C_1_employee_test_sign",
    tenantName: "devportal.onmicrosoft.com",
    requireAuthOnInitialize: true,
    validateAuthority: false,
    onAuthentication: (ctx, error, response) => {
      console.log(response);
      console.log(ctx);
      console.log(error);
    },
    onToken: (ctx, error, response) => {
      console.log(response);
      console.log(ctx);
      console.log(error);
    },
  },
  graph: {
    callAfterInit: true,
    endpoints: {
      profile: "/me",
      photo: { url: "/me/photo/$value", responseType: "blob", force: true },
    },
  },
  request: {
    scopes: null,
  },
});

Answer №1

After trying Angular, I encountered the same issue. The login endpoint you are trying to access is not valid and should follow this format:

https://<tenant_name>.b2clogin.com/<tenant_name>.onmicrosoft.com/<policy_name>

Make sure to target b2login.com instead of onmicrosoft.com for your tenantName :)

In your situation, you should try:

Vue.use(MSAL, {
  auth: {
    clientId: "**************************",
    redirectUri: "https://localhost:44390",
    tenantId: "devportal.onmicrosoft.com/B2C_1_employee_test_sign",
    tenantName: "devportal.b2clogin.com",
    requireAuthOnInitialize: true,
    validateAuthority: false,
    onAuthentication: (ctx, error, response) => {
      console.log(response);
      console.log(ctx);
      console.log(error);
    },
    onToken: (ctx, error, response) => {
      console.log(response);
      console.log(ctx);
      console.log(error);
    },
  },
  graph: {
    callAfterInit: true,
    endpoints: {
      profile: "/me",
      photo: { url: "/me/photo/$value", responseType: "blob", force: true },
    },
  },
  request: {
    scopes: null,
  },
});

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Lining Up Radio Buttons Horizontally Using CSS: Alignment Issues in Mozilla and Chrome

I have recently started learning CSS and am facing an issue with the alignment of radio buttons. They do not align properly in Chrome and Firefox, although they display correctly in Explorer. Any assistance on this matter would be greatly appreciated. Th ...

Retrieve an array of specific column values from an array of objects using Typescript

How can I extract an array from an array of objects? Data var result1 = [ {id:1, name:'Sandra', type:'user', username:'sandra'}, {id:2, name:'John', type:'admin', username:'johnny2'}, ...

A Firefox Browser View of a Next.js and Tailwind Website magnified for closer inspection

After creating a website using Next.js and Tailwind CSS, I noticed that the site is appearing zoomed in when viewed in Firefox. However, it looks fine in all other browsers. When I adjust the screen to 80%, the website displays correctly in Firefox. What ...

Copy both the image and JSON object to the clipboard

I am attempting to utilize the clipboard API to write an image and JSON object to the window clipboard. I am working with Vue and Electron and have successfully written an image and plain text, but I encounter an error when trying to write a JSON object: ...

The fade effect in React and material ui is consistent across both elements

I am facing an issue with a list where, for each list sibling onclick, a different element fades in with different text. The problem occurs when the fade effect starts once on siblings in the list and then disappears, not enabling again. This is the code: ...

JavaScript's getElementsByName() method allows for easy access and

Excuse my lack of experience... I am attempting to run a javascript using the getElementByName method, with the goal of entering 0 in the quantity field on a particular site after 15 seconds of arriving there. Upon inspecting the quantity field, here is w ...

React- hiding div with hover effect not functioning as expected

I'm having trouble using the :hover feature in CSS to control the display of one div when hovering over another, it's not functioning as expected. I've successfully implemented this on other elements, but can't seem to get it right in t ...

Leverage Jquery within the div element to manipulate the data retrieved from a post ajax request

On my one.jsp page, I have the following post code: $.post("<%=request.getContextPath()%>/two.jsp", { vaedre: fullDate} ,function(result){ $("#theresult").append(result); }); This code generates the followi ...

A guide to efficiently managing updates and inserts with bulkCreate in node.js

Currently, I am utilizing node.js to facilitate the uploading of an excel file into a database. Furthermore, in my service, I am employing bulkCreate to efficiently upload the data into the mysql db. In order to provide more context, I will outline the str ...

Receiving an empty response while attempting a cross-domain AJAX request using YQL

I have implemented the code below for performing a cross-domain AJAX request using YQL : function requestCrossDomain( site, callback ) { function cbFunc(data) { // Proceed if there is data to work with... alert("inside call back"); if ( data.results[0] ...

Having trouble running Vue component tests with Vitest

I need help with my project setup which includes: Using Vue 3 Webpack as the development server Vitest and Vue Test Utils for testing utilities While I can write and run tests for simple JavaScript functions without issues, I encounter an error when tryi ...

Is it possible to transmit data using props in Vue 3's Slots Attributes feature?

Can data be passed through slots? For example, is it possible to have a named slot called "button" and pass it an href that will be added to an a tag? Here is an example: CustomComponent.vue <template> <div> <h2 class="text-lg&qu ...

Ways to position cursor at the end in the Froala Editor

My current dilemma involves the need to position the focus/cursor at the end of text that is loaded within the Froala editor. I attempted to accomplish this using the focus event of Froala (events.focus), but unfortunately, it did not yield the desired out ...

Modify the page's query parameters by incorporating an input field within NextJS's App Router

I'm trying to update query parameters based on user input dynamically using the onChange event. However, I'm facing an issue where the query parameters are updated before the input value is updated after a slight delay. My aim is to achieve insta ...

Switch out all content located after the final character in the URL

In my code, I am using JavaScript to replace the current URL. Here is the snippet: window.location.replace(window.location.href.replace(/\/?$/, '#/view-0')); However, if the URL looks like this: domain.com/#/test or domain.com/#/, it will ...

What steps should I take to create a React component in Typescript that mimics the functionality of a traditional "if" statement?

I created a basic <If /> function component with React: import React, { ReactElement } from "react"; interface Props { condition: boolean; comment?: any; } export function If(props: React.PropsWithChildren<Props>): ReactElement | nul ...

What is the best way to transfer the value of one directive attribute to another directive in AngularJS?

For instance: <custom-main> <custom-sub1 att-name="test"></custom-sub1> <custom-sub2></custom-sub2> </custom-main> JavaScript Source Code bosAppModule.directive('custom-main',[&apos ...

Tips for managing Express.js callbacks and modifying an object's property from within a function

I am currently working with two JavaScript files. I have successfully retrieved data from MongoDB using the method bookDao.getActiveBookByCategoryId(). The Issue I Am Facing: Within the categoryDao.js file, I am attempting to update the resultJson.book_c ...

Can one retrieve a catalog of Windows Updates that have been installed by utilizing node.js?

Currently, I am working on a JavaScript/Node.js project where I am seeking to retrieve a comprehensive list of all installed windows updates, similar to how it is done using the C# WUAPI 2.0 Type Library. I have attempted utilizing WMI calls (specifically ...

What is the process for creating a list using AngularJS?

Looking to create a list of products including name, price, PV, and BV. Below is the JSON data stored in $scope : $scope.products = [ {"id":1,"name":'SP0300370 Nutrient Super Calcium powder',"price":21,"PV":18,"BV":18}, {"id":2,"name":'S ...