How to get conversation id if we only have send-only permission of user outlook account? - outlook

Is it possible to get conversation id and message id of the messages sent by our app on behalf of the user who only given send only permission?
We want to send follow-up mails in the same conversation and there is no way we can do that without message id.

I'm afraid not. You need to have mail.read in order to find the message id and add to the conversation.
Also, it's important to note that the id is mutable and can change for any number of reasons (most commonly the mail item being moved to another folder). It is possible to get immutable identifiers for Outlook resources but this functionality is still in Preview so, for the time being, it really shouldn't be used in a production environment.

Related

Slack Bot send DM message to the User

I want to send message as DM to the users, so I've come with some questions;
1- There are two ways to send DM to the user;
the first one open a conversation with user by using conversation.open, and send message. Then if I want to send the message to the same user, I use conversation.list and find the conversationId by userId, then send message to the same channel again.
Second one is just basically using userId as channelId parameter in chatPostMessageRequest.
I've tried both ways, and both of them are sending message as DM. So, what is the purpose of using conversation.open? I'm asking this because nearly all the answers say you should do this etc.
2- Seems like there is no way to get multiple users by emails except users.list?
3- Also seems like there is no way to send messages to the multiple user at the same time (the content of the messages are different, those are depends on user data).
Sending a direct message by user ID works with chat.postMessage as a convenience, a shortcut. But it's the only method/API that allows you to use a user ID as a channel ID, so Slack warns developers away from relying on it in totality -- if you use conversations.open and the resultant conversation ID, it'll work for other methods like chat.update should you need to edit the message after sending it.
Slack doesn't offer many "lookup" APIs -- most things you'll want to look up require fetching an entire data set (like a list of users with all pages of users.list) and then filtering the results yourself. There are no APIs to look up multiple users at once via email address.
There is also no way to send the same direct message content to multiple users with a single request. In most cases, when an app is sending the same message to multiple users the best practice would be to use a channel to broadcast the message a single time, with the intended recipients as members of the channel.

Can I create a configuration page for a Teams bot app?

I'm building my first Teams app which will have two primary functions:
Proactively send a message to the channel (the bot is installed into) when a specific event occurs on my backend.
Members of the channel reacts to the message via actions.
I finally have a pretty good idea of how to set this up (I think) - but one part I'm missing is that in order to identify the specific app installation as belonging to one of my customers, I need to be able to allow the installing user to supply extra information like e.g. an API-key so that I can associate the specific channel with my specific customer.
Is there any way of doing this with a bot app? I've found examples for creating a configuration page, but they all seem to be associated with tab apps?
I could of cource have the bot ask the user for the information - but maybe there's a "cleaner" way?
Any examples or tutorials would be greatly appreciated as I find it rather hard to get stuff working using Microsoft's own examples etc. :)
Thanks a lot!
When you receive any message from the user, either by typing to your bot, or even installing it into a channel, group chat, or personal context (where you get the conversationUpdate event), you are able to get specific details off of the activity object. If the user sends a message, for instance, then the text property on the activity object will have a value. Incidentally, this is the same activity you will use to get the conversation details you need for the Proactive message.
With regards your question, the activity class also includes a tenantId property, hanging off the conversation property. This is the unique Microsoft 365 Id for the tenant, which would be what I'd suggest to uniquely identify them for your API, or licensing, or similar.

How do I correlate user between channels?

From what I see, Bot Framework is providing an abstraction over users in different channels by providing a ChannelAccount class that has ChannelId/Address pair to identify user via its account and Id property, which is... okay, here's the question.
I suppose that the idea behind Id is to provide a unique and persistent identifier that can be used to cross-correlate users between account (i.e., I can say that Slack user #alpha is also email user alpha#company.con). This idea is supported by the fact that ChannelAccount for my bot always has same Id regardless of the channel (and Address is different between channels, obviously).
If this is right, and I hope it is, is there any way to provide BotConnector with the correlation information? I.e., I want BotConnector to give me ChannelId/Address, and I'd give back user Id which I'd the get back in incoming message.
The purpose of this is quite simple: I want the code inside my bot to use the Id as already correlated identifier so that I can log it, build logic from it and so on.
BotFramework does not yet support linking of accounts. In the interim, take a look at this post for one way you might implement a solution:
Why isn't BotUserData persisting and retrievable in my Bot Framework bot?

Saving data in parse to a not yet existing user

I am new at programming. I am building sort of like an chat app and I am using Parse as a backend. I want to make it possible for an existing user to send a message to a non existing user if the user knows the non existing-users email. The non-existing user will then get notified by the app on his email that this person send him a message and that he needs to sign up to read the message, and here is the question:
Does Parse makes it possible to chain this message to the non-existing users email, so that when he signs up in the app with this specific email the specific message to this email will display?
Thanks in advance.
No, not exactly.
You can create the user with the appropriate e-mail address and a made up password. Once that user exists (and hence is saved) you can start to associate things with it. After that you can send an e-mail to the prospective new user allowing them to complete the registration (this is basically a password reset).

Changing the sender of a Dynamics CRM e-mail in a plugin?

So, here's my situation. We have a department that needs the ability to use queues in CRM 4. They also need the ability to reply to e-mails that come to that queue from their department e-mail address. (So that any customer responses will go back to the queue to be handled by agents)
I originally was going to build a JavaScript customization that inserted a checkbox that said "Send From Business Unit". Toggling this would look up their department user based on the e-mail address on the Business Unit. I successfully got this working (as a concept), but found that actually sending triggers the dreaded "CrmCheckPrivilege failed."
Which is good, because that means CRM is actually enforcing security.
So my problem? I have no idea how to replicate this functionality and it's a must have for this customer group. Is there anyway to modify the e-mail after it's already gone through security checks via a plugin? Perhaps a pre-stage send plugin?
I want to be reasonably certain of success before I commit a lot of time to this solution. I'm also open to any other ideas too.
Thanks in advance,
Clif
Well, first, a "CrmPrivilegeCheck failed" can always be fixed by adjusting the user's roles and giving him the appropriate privilege (the privilegeId is always returned in the exception but may not be shown in the particular error dialog you are getting) and level, but this may not be wanted by the department.
A solution we have used is just slightly different from yours: Do not send the mails through another user, but through the queue. Queues can also be eMail senders in MSCRM. The queues should already have the correct eMail addresses set in order to work properly with the eMail router. Set up a way to determine the correct queue (like a field on the systemuser entity or a hardcoded queue name in your JavaScript) and set the from lookup accordingly in your JavaScript. That way the eMails will be sent using the name and address of the queue, so any direct replies will always have that queue as the recipient.

Resources