I am using the guest user invitation api as defined here to add a guest user to my Active Directory.
The post request succeeds with a 201 response code and returns the following data:
{
"#odata.context":"https://graph.microsoft.com/v1.0/$metadata#invitations/$entity",
"id":"xxx",
"inviteRedeemUrl":"https://invitations.microsoft.com/redeem/?tenant=xxx&ticket=xxx&ver=2.0",
"invitedUserDisplayName":"xxx",
"invitedUserType":"Guest",
"invitedUserEmailAddress":"xxx#gmail.com",
"sendInvitationMessage":false,
"inviteRedirectUrl":"http://localhost:4200/",
"status":"PendingAcceptance",
"invitedUserMessageInfo":{
"messageLanguage":null,
"customizedMessageBody":null,
"ccRecipients":[
{
"emailAddress":{
"name":null,
"address":null
}
}
]
},
"invitedUser":{
"id":"xxx"
}
}
When I check the active directory using the Azure UI, I see that the user is created in the directory. But I never receive an invitation email, unless I click the resend invite button in the UI for the user.
How can I make sure that an invite email is sent when I send my request to the invite api, without having to manually click the resend invite button for the user?
Silly mistake on my part. You need to add the sendInvitationMessage: true property in your request json payload in order to send the email. The documentation for allowed properties in your request object is here https://learn.microsoft.com/en-us/graph/api/resources/invitation?view=graph-rest-1.0
Related
I have set-up an approval workflow where a user gets notified if his / her request has been submitted for approval. The request is submitted via Microsoft Forms, the workflow then takes the submitters e-mail as the "To" for said notification. This is done via a HTTP Post Action so that the e-mail is directly from SharePoint and not me, the process owner.
This works fine for most user e-mails... however there are some cases where this error message pops up:
{"odata.error":{"code":"-2130242040, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The e-mail message cannot be sent. Make sure the e-mail has a valid recipient."}}}
My action is configured as follows:
HTTP Post Action Configuration
The flow successfully retrieves the user's e-mail address but it is not sending it. This happens to roughly 20% of users.
Thank you!
The body of an unsuccessful e-mail HTTP Post:
"body": {
"status": 400,
"message": "{\"odata.error\":{\"code\":\"-2130242040, Microsoft.SharePoint.SPException\",\"message\":{\"lang\":\"en-US\",\"value\":\"The e-mail message cannot be sent. Make sure the e-mail has a valid recipient.\"}}}\r\nclientRequestId: xyz\r\nserviceRequestId: xyz",
"source": "https://www.sharepoint.com/Teams/Team_Name/_api/SP.Utilities.Utility.SendEmail",
"errors": []
}
}
Successful HTTP Post:
{
"odata.null": true
}
I'm creating a bot to notify a user after an action has been done. Where i'm able to get my details using the below(screenshot) code.
Now in order to send a message to a user through a bot i would need his/her ID before hand to send a notification like in the above case i'm able to extract my info as i'm already logged in Teams. Unfortunately alphanumeric ID is very difficult to use and needs to be there before requesting and sending the notification.
Below is the JSON result if the ID is already known.
Response body
{
"id": "29:1GcS4EyB_oSI8A88XmWBN7NJFyMqe3QGnJdgLfFGkJnVelzRGos0bPbpsfJjcbAD22bmKc4GMbrY2g4JDrrA8vM06X1-cHHle4zOE6U4ttcc",
"objectId": "9d3e08f9-a7ae-43aa-a4d3-de3f319a8a9c",
"givenName": "Larry",
"surname": "Brown",
"email": "Larry.Brown#fabrikam.com",
"userPrincipalName": "labrown#fabrikam.com",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47",
"userRole":"user"
}
How i can get the unique ID of the user by using email id so that i can send a personal message to him/her using bot.
There is an option to fetch conversationChatId to send proactive message.
Before you fetch the conversation Id, you should check whether your bot is currently installed for a message recipient or not.
Note: Installation of app via Graph API triggers conversation update event for Bot.
What are the google/Microsoft(Skype) APIs available in order to register user in my application with the same user id as received in fulfillment request payload to my web hook?
I receive following for skype:
{
"originalDetectIntentRequest":{
"source":"skype",
"payload":{
"user":{
"name":"Sana Zehra",
"id":"29:1I3o3Np8sTLU7YSuhHO-IDuc1SgqMwg-83YwGryAZceE"
}
}
}
}
For Google I receive this:
{
"originalDetectIntentRequest":{
"payload":{
"user":{
"lastSeen":"2019-01-02T07:57:02Z",
"locale":"en-US",
"userId":"ABwppHHxPEyGWY1R26WqV3o5i1w8YNGbAIn5TXd28cre8Eu3iWtPlJEMuSzPWIW1b5u8e94djCv1xvmszegO1Q"
}
}
}
}
I need to register my users with this id as I authenticate if an incoming request is a registered user or not.
You would need to build a flow for registration something that allows you to gather all the required information and register the user at your end, you can then verify if the user is registered by validating them against their id.
A sample article that handles the user registration via chatbot scenario:
https://medium.com/#sage.mcenery/building-a-registration-chatbot-on-aws-with-lex-and-twilio-4a14c15b8725
You can use google helpers in case of assistant which can give you the following additional info about the user:
Display name,
Given name,
Family name,
Coarse device location (zip code and city),
Precise device location (coordinates and street address)
Documentation on the same:
https://developers.google.com/actions/assistant/helpers#built-in_helper_intents
I've never tried this myself though so I'm not too sure about this.
I do not think Skype and Google will give you much info about the user if that's what your looking for but a unique id against the user should do the trick in most cases.
Neither ID has any direct relation to the user's account on that platform.
Furthermore, the userId provided on the Actions on Google platform has been deprecated, and is scheduled to be removed in May 2019.
The suggested way to associate the user's Google account with their session with you is to use Google Sign In for Assistant. With the user's one-time permission, you can then get their Google profile ID and other profile information.
My company is trying to avoid having many Docusign logins for the group (group X) using Docusign. We were wondering about using one login to do the create, but override the email settings to have it go to members of group X without them having to have Docusign credentials. I was wondering if that would be possible with the replyEmailAddressOverride.
You can do so by using the "Send On Behalf Of" feature where you specify an email address in the authentication header in order to "assign" each transaction to a specific person with the same and unique credentials.
{
"Username": "",//Email of Group X credentials
"Password": "", // Password of Group X credentials
"IntegratorKey": "",// Integrator Key of Group X credentials
"SendOnBehalfOf": "" // Email of the specific person to be assigned the DocuSign transaction
}
If I understand your question correctly, I am not sure that using the replyEmailAddressOverride feature will accommodate what you need.
From the official documentation, this email will be used when the user decided to "reply" to the email sent from DocuSign.
Example in C# below :
EmailSettings settings = new EmailSettings
{
ReplyEmailAddressOverride = "otherUserThanTheSende#fakeemail.com",
ReplyEmailNameOverride = "Other User"
};
envelope.EmailSettings = settings;
If you configure the above email settings, when the signer receives the DocuSign email inviting him to initiate the signing ceremony, if he/she decides to reply to this email, the original DocuSign sender email will not be used but instead the email you have configured will be used.
Example, my "Frederic "account was used to create a transaction so the sender appears as "Frederic" in the DocuSign email. However, when I decide to reply, it doesn't go back to "Frederic" but instead to the user I have configured in the envelope :
But if I understand correctly, you want to send a transaction from a specific sender and this email override setting doesn't affect the transaction sender but the transaction reply.
If you want to use replyEmailAddressOverride and replyEmailNameOverride as present in DS Docs then when an email goes to the signer from DocuSign and if they want to revert to that email then it will go the email which is mentioned in replyEmailAddressOverride property
I'm trying to receive the Recipient Url for embedded signing within our application.
I won't have the user's credentials, and all my API calls are going through as a Ds administrator account.
When I execute the following I get an error message:
{
"errorCode": "ACCOUNT_NOT_AUTHORIZED_FOR_ENVELOPE",
"message": "This account is not authorized to access the requested envelope."
}
If I execute this against envelopes that are assigned to me it works fine but not other users. I should also point out we are not currently making use of clientUserId when creating recipients. Only a small portion will need embedded signing.
It was my understanding an administrative account would be able to retrieve the url needed to begin the embeded signing process. Is this not correct?
Also under what circumstances would email and userName not be the same? Aren't usernames always email addresses?
Request :
POST https://demo.docusign.net/restapi/v2/accounts/244043/envelopes/41d02a5f-13f8-4fb5-897d-142e1c653645/views/recipient
X-DocuSign-Authentication: <DocuSignCredentials><Username>blah</Username><Password>blah2</Password><IntegratorKey>blah3</IntegratorKey></DocuSignCredentials>
Content-Type: application/json
{
"returnUrl": "http://www.[somedomain].com",
"email" : "someguy#gmail.com",
"userName" : "someguy#gmail.com",
"authenticationMethod" : "email"
}
EDIT:
Additionally if I try the following for my request :
{
"returnUrl": "http://www.[mydomain].com",
"userId" : "xxxxx-xxx-xxxx-xxx-xxxxxxxxxx",
"authenticationMethod" : "email"
}
I receive :
{
errorCode: "INVALID_USERID"
message: "Invalid UserId. UserId specified in request does not match authenticated user."
}
In addition to the issues in Luis Scott's answer, you're missing one of the required parameters for the Recipient View method --
clientUserId A sender created value that shows [that] the recipient is embedded (captive). Maximum of 100 characters.
Create a value for the clientUserId and include it for the signer when you create the transaction (when you send the signing request).
Then include it when you want the Recipient View. It's a security measure to ensure that it is ok for your web app to authenticate the signer.
Only include the clientUserId for signers where you can authenticate them yourself and you plan to offer them the embedded signing view.
1) Please ensure the user being used for the API calls has the "Account-Wide Rights" setting enabled under preferences -> users -> permissions.
2) The Username field should be the recipients full name that was provided during envelope creation. So it would be "Some Guy" IMO using your sample above.