Replies: 1 comment
-
If you use the msal2 provider, do you have the same issue? The MSAL Provider has been deprecated for a long time now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am trying to create a Asp.NET MVC app and added Graph Tool Kit component using React. When I clicked on Sign In, I could login, but the SignIn button still shows the Same, and I couldn't even see person details. Can you please help me with this. Thanks.
GraphComponenet.jsx
import React from 'react';
import { Providers } from '@microsoft/mgt-element';
import { Login, Person } from '@microsoft/mgt-react';
import { MsalProvider } from '@microsoft/mgt-msal-provider';
// Initialize the MsalProvider with your client ID
Providers.globalProvider = new MsalProvider({
clientId: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX',
authority: 'https://login.microsoftonline.com/XXXXXXXXXXXXXXXXXXXXXXXX'
});
const GraphComponent = () => {
return (
<div.>
<Login ./>
<Person personQuery="me" showPresence={true} view="twolines" . />
</div.>
};
export default GraphComponent;
Index.js
import React from 'react';
import ReactDOM from 'react-dom/client';
import GraphComponent from './GraphComponent.jsx'; // adjust the path as needed
function App() {
return (
<div.>
Hello from React!
</div.>
);
}
const root = document.getElementById('react-root');
ReactDOM.createRoot(root).render();
//export default App;
Below is the error:

Beta Was this translation helpful? Give feedback.
All reactions