Comments (9)
Hello @waldekmastykarz , I will send the video tomorrow. I'm facing problems with the Office add-in to consume the web API so I will share the idea on the video. I'm not sure if I will fix it before the deadline and I prefer to share what I have
from hack-together.
I have uploaded the presentation video now, in a couple of hours I will be submitting the demo video too
from hack-together.
from hack-together.
Awesome! Could you also submit the companion Office add-in? It would be awesome to see it in action end to end 😊
from hack-together.
Hey @felipeschneider88, would you mind recording a short video walkthrough of your hack? Any format will work. It's not required for the hackathon but it would help us showcase your work both internally at Microsoft and publicly in the community. 😊
from hack-together.
Could you please share any more information about what's not working with the add-in? Perhaps we could help you fix the issue.
from hack-together.
Yes, Today the app is built with 2 projects. One is the web API that interact with the Microsoft graph, it has the business logic on it.
The second is an Office add-in project that uses the SSO option to get the logged user. I was able to get information about the logged user in Excel. I was also able to get info from an URL that doesn't need auth
const element = document.querySelector('#product-name');
fetch('https://testapi.jasonwatmore.com/products/1)
.then(response => response.json())
.then(data => element.innerHTML = data.name);
But when I tried to get a token from the SSO to call the web API It fails
This is the code I'm using on the Excel Add-in:
async function getCalendar() {
let userTokenEncoded = await OfficeRuntime.auth.getAccessToken({
allowSignInPrompt: true,
allowConsentPrompt: true,
forMSGraphAccess: true,
});
const element = document.getElementById("item-subject");
let path = 'https://localhost:7068/calendar'
$.ajax({
url: path,
method: "GET",
headers: {
"Authorization" : "Bearer " + userTokenEncoded
},
success: function(response) {
element.innerHTML = response.json();
}
});
}
from hack-together.
Do I understand it correctly that your API is rejecting your token? Have you tried looking into the token at https://jwt.ms to see to which audience it's issued and if that audience is valid with your API?
from hack-together.
Hello, I have checked and the audience is the same (both apps are using the same AD registered in azure) with id
22969033-cb4f-4019-b265-fd9e8056f2ff
from hack-together.
Related Issues (20)
- Project: Summarize an email (Use Cognitive Services for the summarization) and send the summary to a Teams channel. HOT 4
- Project: [Microsoft Learn Tutorial] Build dotNET apps with Microsoft Graph SDK HOT 4
- Project: Graph SDK to get calendar items and send mail HOT 1
- Project: Create Teams Meeting HOT 1
- Project: Gets a specified attributes of a signed in users profile information HOT 1
- Project: This is a sample app that get user info using the Microsoft GraphApi HOT 1
- Project: Automation in Hazardous Jobs HOT 5
- Project: An app for aggregating and sharing files from all drives in an organization HOT 6
- Project: Microsoft Teams Bot - Schedule Meetings for a Team and send the meeting link by e-mail for all members HOT 2
- Project: Financial Control HOT 6
- Project: This Web Portal Displays TeamsUser details along with their Current Availability Status HOT 5
- Project: Console app using GraphApi to see next events and create new ones HOT 5
- A helper in need on Microsoft Teams HOT 5
- Project: Convert users' meeting recordings to summarized text and send summary by email HOT 2
- Project: What was I doing again? HOT 3
- SharePoint Large File Downloader & Uploader Toolkit for the Modern Workplace HOT 4
- https://nam06.safelinks.protection.outlook.com/ap/p-59584e83/?url=https%3A%2F%2F1drv.ms%2Fp%2Fs!AuNMtEjxAns_gQpFYBenRALwSV5B%3Fe%3DXDO5eJ&data=05%7C01%7CDaisy.Chaussee%40microsoft.com%7C0c6c70c7cabf42360ca708db2616a024%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638145651782668569%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=FQhX00ygwuDCoYdb%2BDtO3ts6Y3gMn4MzceXEQa1chvo%3D&reserved=0: <short description> HOT 1
- It will be possible to write a comment in a specific cell in an excel file? HOT 1
- Project: Summarize videos hosted in Drive HOT 1
- Project: <Hack-together> HOT 1
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 hack-together.