Can the MS Graph meeting link be opened directly in the browser? - microsoft-graph-api

I have successfully created an onlineMeeting object by using MS Graph API
POST /users/{userId}/onlineMeetings
I can extract the joinWebUrl (or the joinUrl, both seem to be the same) and get it to open on a new tab, which gives a popup asking whether I should open the Teams App on my system to join the meeting. If I say yes, the Teams App opens up and I can join the meeting through it. If I say no, the Teams launcher page is opened, where I can
a. Download the app
b. Continue on the browser, or
c. Open Teams.
My question is, how can I get the meeting opened up directly on the browser, bypassing the popup and the launcher page? Everywhere I search, questions are on how to open the meeting directly in the app, but I need it the other way around, in the browser. Is this possible through code?
I'm including my graph API code below, even though it might not be relevant.
let data = {
"startDateTime": "2022-08-16T13:20:34.2444915-07:00",
"endDateTime": "2022-08-16T13:25:34.2444915-07:00",
"subject": "Teams Meeting"
}
let payload = await fetch("https://graph.microsoft.com/v1.0/users/{userId}/onlineMeetings", {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + tokenResponse.accessToken,
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
});
let json = await payload.json();
window.open(json.joinWebUrl);

The default behavior is: it open the Teams launcher page:
Here, you can click on checkbox to always open the links in associated app but we don't have any option to always open it in browser.

Related

Custom activity feed notifications sent from daemon(nodejs app), not getting the data assigned to subEntityId in teams mobile client

I'm using activityFeedNotification graph api to send push notification to the users of our teams tab app from backend using nodejs. The notification is sending successfully in both teams desktop and mobile client but we're not getting the data assigned to subEntityId in mobile client(In desktop client and browser we're getting it).
We are encoding the data(object) and assigning it to the subEntityId in teams context in our nodejs application. Then in teams client, we get that data from teams context using microsoft teams sdk and redirect user to the respective page in our application based on whatever data we get in subEntityId
In desktop, deeplinking is working perfectly but in android client, we're not getting any data in subEntityId. It is just opening the homepage of our tab app but I need to redirect user to specific page based whatever data is assigned to subEntityId.
Below I've provided how we're encoding the data and assigning it to subEntityId.
Server Side:
const context = encodeURIComponent(
JSON.stringify({
"subEntityId": {
"type": "PROGRAM_PROFILE",
"program_id": "12345",
uid: uuidv4(),
}
})
);
const body = {
topic: {
source: 'text',
value: notificationTopic,
webUrl: `https://teams.microsoft.com/l/entity/${TEAMS_APP_ID}/index?context=${context}`,
},
activityType: 'commonNotification',
previewText: {
content: notificationSubtitle,
},
templateParameters: [
{
name: 'title',
value: notificationTitle,
},
],
};
const url = `https://graph.microsoft.com/v1.0/users/${userId}/teamwork/sendActivityNotification`;
await axios.post(url, body));
Client Side:
const context = await app.getContext();
console.log(context?.page?.subPageId); // getting undefined
Any kind of help is appreciated!
From the documentation:
{page.subPageId}: The developer-defined unique ID for the subpage this content points defined when generating a deep link for a specific item within the page. (Known as {subEntityId} prior to TeamsJS v.2.0.0).
You are using subEntityId on the backend but accessing subPageId on the client side.

SendInBlue trackEvent returns 204 but does not show event in the console

I am trying to send an event using the SendInBlue API here.
When I send the event, it returns a 204 correctly - but I am not getting any events here and I have created an automation flow which is triggered by the event, and it does not send.
const axios = require("axios");
const url = 'https://in-automate.sendinblue.com/api/v2/trackEvent';
(async() => {
try {
const event = await axios.post(
url,
JSON.stringify( {
email: 'myemail#emailprovider.co',
event: 'USER_SUBSCRIBED'
}),
{
Accept: 'application/json',
'Content-Type': 'application/json',
'ma-key': 'xkeysib-MY_v3_API_KEY'
},
);
console.log(event);
} catch (err) {
console.log(JSON.stringify(err))
}
})();
Is there a way I can see the events from this call coming in on the console?
The ma-key is not the same that API KEY. You should use the ma-key instead your current API for the automatization key.
After a couple of mails and a phone call, i figured out where is the ma-key:
You should login at send inblue. Click on Automatization (top menu). Click on Config (left tab bar). Click on something like 'see tracking code'. Then, you see a JS code. In this code, there is a key on it. This is your key.
My panel is in Spanish so maybe the words are not the same. Cheers.
As far as I know you can't really see the events in the console.
If you just want to make sure it's working you can
go to automation
start a workflow
Select a trigger: Website activities => An event happens
If you can select your event it means it worked.
Sendinblue is more a marketing automation tool and not an event analytics. So I'm not surprised you can't see the event in the GUI. If you want to see the events, try something like Mixpanel.
As #hector said pay attention to the API key. you're using the V3 campaigns (emails, contacts...) key. The tracking API is different.
Also, if you want to add event data, apparently you absolutely need to add a random unique ID. I struggled to find this as their docs are not super clear about it. So the body should look like something like this:
body: jsonEncode(<String, dynamic>{
'eventdata': {
id:"123456",
data: {
event_data1: value1,
event_data2: value2,
}
}
'email': example#mail.com,
'event': eventName
}),

How can users see the comments in a PowerPoint file via the graph-api Preview URL?

We are using Graph API to display our on-premises sharepoint files within a public facing web app. The users of the web app have complained that comments in powerpoint files are important and they cannot see these via our app (we use graph's preview url to display the file to them.)
Short of asking them to download a copy of the file to open in PowerPoint themselves (our stake holders don't want users to be able to download copies of our files) is there any way this is possible via the viewer?
If we use the webUrl property from graph-api, this opens the file on sharepoint in the Office 365 PowerPoint web app, which allows for viewing slideshow comments, but this is not going to work for users as they do not have accounts for our on premises sharepoint so will be prompted to log into our sharepoint site at this point (we do not want them to have accounts here.)
Current code (simplified) is:
<a href='#' onclick="LoadFilePreview('{sharepoint-item-id-goes-here}')>Click here to view the slideshow</a>
And the js:
function LoadFilePreview(itemId) {
var auth = $("#authToken").val();
var graphUrl = "https://graph.microsoft.com/v1.0/sites/" + siteId + "/drive/items/" + itemId + "/preview";
$.ajax({
type: "POST",
url: graphUrl,
dataType: 'json',
headers: { "Authorization": "Bearer " + auth },
accept: "application/json"
}).done(function (data) {
window.open(data.getUrl);
}).fail(function (e) {
ajaxFailed(e.status, LoadFilePreview, itemId);
});
}
I'm afraid that we can't call POST /drives/{driveId}/items/{itemId}/preview without a signed in user.
Based on driveItem: preview Permissions, Application permission(without user) is not supported.
You can post your idea on Microsoft Graph User Voice to get attention of the product group.

find all requests in which user is participant in the service desk

In JIRA, how to get the all issues which user is participant?
I can get the results for assignee and reporter.
I am using following query to get the issues when the user is reporter.
reporter = user AND updated > -10d
I need to display the issues only the user is participant not the reporter or assignee. How to achieve this in the search API?
If you prefer to use the Jira's search API, given that you're looking for issues that the user is a participant of, try adding this in your JQL "Request participants" in (currentUser()).
Since you're concerned with Jira Service Desk (JSD), you might want to try the following JSD specific REST APIs depending on which deployment you're working with:
Server: Get my customer requests then pass requestOwnership query parameter with the value of PARTICIPATED_REQUESTS.
Cloud: Get customer requests then pass requestOwnership query parameter with the value of PARTICIPATED_REQUESTS.
EDIT: (added code snippet)
app.get('/getMyRequests', addon.checkValidToken(), function(req, res) {
var httpClient = addon.httpClient(req).asUserByAccountId("myAccountId");
httpClient.get({
url: '/rest/servicedeskapi/request',
headers: {
'X-Atlassian-Token': 'nocheck',
'Content-Type': 'application/json'
}
},
function (err, httpResponse, body) {
if (err) {
return console.error('failed:', err);
}
console.log('successful:', body);
});});

Can I POST data to a Google Web App without having to authenticate?

I'm trying to POST data to a Google Web App to automatically enter some tedious data. Whenever I try I get a response back asking me to log in, the Web App is deployed to be accessible by anyone.
Can I POST data to the form without authentication? If not, what type of authentication is required?
Edit: Quick code sample I threw together:
WebClient client = new WebClient();
var keyValue = new NameValueCollection();
keyValue.Add("agentName", "John Doe");
keyValue.Add("dayOff", "Sunday");
keyValue.Add("startTime", "8:00 AM");
Uri uri = new Uri("mywebapp url");
byte[] response = client.UploadValues(uri, "POST", keyValue);
string result = Encoding.UTF8.GetString(response);
In order to allow anyone to execute your script, even if they are not signed in to a Google account, you need to use the following settings in the "Deploy as web app" dialog:
Project version: if in doubt, select "New" to ensure that you are deploying the latest copy of the script's code.
Execute the app as: select "Me". This ensures that the "even anonymous" option will be available.
Who has access to the app: select "Anyone, even anonymous". (Note that if you select "Anyone", only users that are signed-in to a Google account will be able to execute your script.)
Once you have selected these options, click the "Update" button and copy the script URL. It should look like https://script.google.com/a/macros/<APPS DOMAIN>/s/<SCRIPT KEY>/exec. At this point an unauthenticated GET or POST to the script's URL should be successful.
Be aware that the script's execution will count against your daily Apps Script quota.

Resources