Slack API - how to parse users without notifying - bots

Whenever we parse a user by their ID with <#Usomething>, it will automatically parse that user ID and replace it with the associated name in channel.
Sometimes you just want to parse the name and not have the person be notified. Is there a way to do a silent parse?

You could accomplish this by using the Slack API method users.info: pass the user ID into that method, retrieve the user's name attribute, and then use that in your Slack message.

Related

Docusign API - Update from email and identity

I would like to change the sender (from : ...) email and identity for each envelope with the api in php.
Without change the account user email and identity.
Is it possible ?
If it's not possible, i have also try with creating a new admin user and change the user_id in the api client. But i can't get the access token only changing the user id. Is it normal ?
The "From" field is entirely dependant on the user that makes the API call to send the envelope - the only way to control it is to change the user that is authenticating and sending the API call.

Retrieve Teams User ID based on AAD ID

I am trying to start a scheduled proactive conversation (the bot initiates the conversation on scheduled time).
I managed to get the User's AAD ID based on Graph API, but it doesn't match the Teams user ID. Tried for over 2 hours to obtain the right id, but I can't figure it out how. What would be the best approach I should take?
Have a look at the Microsoft Graph api to get the chat thread ID.
When the app is installed for the user, the bot will get receive a conversationUpdate event that will contain the necessary information for it to send the proactive message. For more information, see Bot events.
If you lose the chatThreadId, you can find it again by calling:
GET /users/{user-id}/chats?$filter=installedApps/any(a:a/teamsApp/id eq '{teamsAppid}')
However, this will only for for the personal scope! My advice would be to make sure you catch the conversationUpdate which is triggered after an install and persist the user details in a database.
I'm curious how you tried to "match" these? In any case, I don't think they're intended to match up in any way (the aadObjectId Guid and the "29:..." user id). As a result, you should store a mapping on your side (database or similar). You need to store ServiceUrl and ConversationId anyway to do proactive messaging, so just tack userid on as well.

How to get user email from botbuilder with Skype for Business?

I'm using botbuilder package in a nodejs application and I need to get the user information from the Skype for Business channel, so that I can authorize against my custom authentication system - the username would work too.
Using session storage or anything like this doesn't work for my use case, so I need the actual user information.
How can I get this information?
In Skype for Business channel, you will found the user email in the id field of the user.
In Node.js: session.message.address.user.id field
In C#: activity.From.Id field
It has the following format: sip:mymail#mydomain.com

Best way to send chrome extension channel id to web application

I am writing a chrome extension that will receive messages from my application. I have managed to write code to retrieve the push messaging channel id in my extension. Now I need to send this channel id to my application and link it to an account so that I know what user this channel id belongs to.
I have been thinking about the best way to do this. So far I am convinced that I should send the channel Id in a GET request to my application and then ask the user to login via OAuth so I can get their email address and I know who they are.
Is there a better way to implement this?

Easy way to retrieve userId of a User that is not active yet?

I provision a user through the docusign api and the new user is not active yet (status=ActivationSent). Now for whatever reason I want to deprovision this user. The deprovision API requires a userId. My question is finding this userId efficiently.
I tried getting the user information using the endpoint
/accounts/{accountId}/users?email={emailAddress} but it returned a 400 with error code USER_LACKS_MEMBERSHIP.
I saw I can get a list of all users for an account using the end point /accounts/{accountId}/users and then finding the user and userId I'm interested in. Is there a more efficient way to get the userId in this scenario than querying all users?
Also is there a corresponding SOAP call to get all of the users for an account? I can't find it in the SOAP documentation.
To the best of my knowledge, the method that you describe (retrieving a list of all users and then iterating through the list to find the user you want to deprovision) is the only way to find/retrieve the User Id of a user that has userStatus = "Activation Sent". Unfortunately (as you've discovered), the /accounts/{accountId}/users?email={emailAddress} is only successful for 'active' users.
That being said though -- when you provision a User via the REST API (POST /accounts/{accountId}/users), a successful Response should contain the userId for the new user. Perhaps your application can store the userId that's received in the response each time a new user is provisioned, and then you can subsequently use that userId value to deprovision a user if/when necessary.
I'm not very familiar with the SOAP API, but I don't see a "get all Users" operation in the DocuSign SOAP API Guide. I'd expect that type of operation to be part of the "Account Management Service API", but I'm not seeing it there.

Resources