Comments (7)
Hi @GeorgiaGit, I am sorry to hear that you are still facing an issue. Did you try to check the browser settings, it might be blocking the pop-up features. You may try to test the productivity dashboard by replacing the person component with the login component which will require a login without single sign on and bring the user profile info:
Login Component:
<mgt-login></mgt-login>
from teams-toolkit-samples.
By any chance did you work this out? I have the same scenario, appears to be connecting to graph ok, all scopes have been setup but nothing in the agenda, files and tasks - also checked that data exists.
from teams-toolkit-samples.
Thanks and I could not work this out after many tries. The MGT just renders the login component and that's all it does. I have now gievn up on this after wasting several hours on several days. I have communicated to the author on LinkedIn as well as a comment on her video on YouTube but still didn't get a suitable reply.
from teams-toolkit-samples.
Hi @krchome, if you didn't try before, can you please try to add a scopes in the provider and let me know if it works:
<script src="https://unpkg.com/@@microsoft/mgt/dist/bundle/mgt-loader.js"></script>
<script>
mgt.Providers.globalProvider = new mgt.Msal2Provider({
clientId: "@Configuration["TeamsFx:Authentication:ClientId"]",
loginHint: "@User.Claims.FirstOrDefault(c => c.Type == "preferred_username")?.Value",
redirectUri: "/blank-auth-end.html",
loginType: mgt.LoginType.Popup,
authority: "@Configuration["TeamsFx:Authentication:OAuthAuthority"]",
scopes: ["User.Read", "User.ReadBasic.All", "Calendars.Read", "Files.Read", "Files.Read.All", "Sites.Read.All", "Tasks.Read", "Tasks.ReadWrite", "People.Read"]
});
</script>
from teams-toolkit-samples.
I've injected the code above without any success.
In my case, I don't even get the logged in user
I've built the app using https://devblogs.microsoft.com/microsoft365dev/build-a-productivity-dashboard-with-microsoft-teams-toolkit-for-visual-studio/ and I've also cloned the app from GitHub.
I get the same behavior every time. I am never prompted to grant Graph permission so the mgt doesn't render.
I put a debugger statement after code snipped above. When it hits the break point, loginHint is empty "". Not sure if that matters.
loginHint: "@User.Claims.FirstOrDefault(c => c.Type == "preferred_username")?.Value",
returns ""
If I hardcode my user name, it has not effect.
from teams-toolkit-samples.
Ayca,
Thanks for taking the time to get back to me. Using the login component definitely helped with getting the sample operational!
Thank You!
I'll update once I find out the issue with mgt.LoginType.Popup. The browser doesn't seem to have an issue opening a pop-up when signing in using the control. Pop-Ups are allowed under settings in my browser as well.
from teams-toolkit-samples.
So glad login component helped @GeorgiaGit, keep me posted please if you find out what could be the reason it doesn't work through SSO without the login component.
from teams-toolkit-samples.
Related Issues (20)
- Add app icon to samples HOT 4
- Error Building React Retail Dasboard HOT 4
- [Sample Onboard Request] meetings-live-code-interview HOT 17
- [Sample Onboard Request] Intelligent Data Chart Generator HOT 6
- [Sample Onboard Request] Containerized Bot App with SSO Enabled HOT 4
- [Sample Onboard Request] Teams Chef Bot HOT 2
- [Sample Onboard Request] Containerized Hello World Tab with Backend HOT 5
- Update sample dependencies HOT 2
- The graph-connector-app does not work HOT 3
- [Sample Onboard Request] Word-Add-In-Writing-Assistant HOT 3
- [Sample Onboard Request] Excel-Add-in-ChartAPI-Anylysis-Data HOT 4
- [Sample Onboard Request] Excel-Add-in-ShapeAPI-Dashboard HOT 5
- [Sample Onboard Request] Excel-Add-in-Custom-Function-Using-WebWorker HOT 4
- [Sample Onboard Request] Excel-Add-in-Mail-Merge HOT 5
- [Sample Onboard Request] Word-Add-In-AIGC HOT 4
- Teams Bot App with SSO on K8S Experiences Multiple Responses with HPA Scaling Beyond Two Pods HOT 2
- Sample not working as Single Tenant HOT 2
- Deploy is failing HOT 2
- Action based message extension with SSO HOT 2
- [Sample Onboard Request] Graph RSC Helper HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teams-toolkit-samples.