Google workspace - how to autocomplete external contacts in chat? - google-admin-sdk

I am trying to add external contacts by by using shared contacts API because I want to autocomplete external contacts in all domain users.
I send POST request with below XML, and I could confirm it is autocompleted in calendar and gmail.
But it is not still autocompleted in chat.
Could you tell me what xml tag should I add in order to autocomplete external contact in chat?
<atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'> <atom:category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' /> <gd:name> <gd:givenName>${sei}</gd:givenName> <gd:familyName>${mei}</gd:familyName> <gd:fullName>${sei} ${mei}</gd:fullName> </gd:name> <atom:content type='text'>Notes</atom:content> <gd:email rel='http://schemas.google.com/g/2005#work' primary='true' address='${address}'/> <gd:im address='${address}' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK' primary='true' rel='http://schemas.google.com/g/2005#home' /> </atom:entry>

Related

Created Google G-Suite shared contact missing name and title

I have written a script to create a shared contact in my G-Suite domain. I have done the OAuth work, and am able to create a contact.
However, when I have created the contact, it does not have all the data I submitted. For example, it does not have name data or title information.
I have tried using the example Google has here: https://developers.google.com/admin-sdk/domain-shared-contacts/#Creating
This is exactly what I am posting:
<atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>
<atom:category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' />
<gd:name>
<gd:givenName>Elizabeth</gd:givenName>
<gd:familyName>Bennet</gd:familyName>
<gd:fullName>Elizabeth Bennet</gd:fullName>
</gd:name>
<atom:content type='text'>Notes</atom:content>
<gd:email rel='http://schemas.google.com/g/2005#work' primary='true' address='liz#gmail.com' displayName='E. Bennet' />
<gd:email rel='http://schemas.google.com/g/2005#home' address='liz#example.org' />
<gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>(206)555-1212</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>(206)555-1213</gd:phoneNumber>
<gd:im address='liz#gmail.com' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK' primary='true' rel='http://schemas.google.com/g/2005#home' />
<gd:structuredPostalAddress rel='http://schemas.google.com/g/2005#work' primary='true'>
<gd:city>Mountain View</gd:city>
<gd:street>1600 Amphitheatre Pkwy</gd:street>
<gd:region>CA</gd:region>
<gd:postcode>94043</gd:postcode>
<gd:country>United States</gd:country>
<gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
</gd:structuredPostalAddress>
</atom:entry>
It creates the contact, but is missing the names, title, etc.
This is what is returned by the post:
<?xml version='1.0' encoding='UTF-8' ?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' xmlns:gContact='http://schemas.google.com/contact/2008'>
<id>http://www.google.com/m8/feeds/contacts/compcc.com/base/36b40df989628b57</id>
<updated>2017-01-17T15:42:32.736Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' />
<title type='text'></title>
<content type='text'>Notes</content>
<link rel='http://schemas.google.com/contacts/2008/rel#edit-photo' type='image/*' href='https://www.google.com/m8/feeds/photos/media/compcc.com/36b40df989628b57/1B2M2Y8AsgTpgAmY7PhCfg' />
<link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/compcc.com/full/36b40df989628b57' />
<link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/compcc.com/full/36b40df989628b57/1484667752736001' />
<gd:email rel='http://schemas.google.com/g/2005#work' address='liz#gmail.com' primary='true' />
<gd:email rel='http://schemas.google.com/g/2005#home' address='liz#example.org' />
<gd:im address='liz#gmail.com' primary='true' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK' rel='http://schemas.google.com/g/2005#home' />
<gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>(206)555-1212</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>(206)555-1213</gd:phoneNumber>
</entry>"
Does anyone know what might cause this?
Thank you.
After opening a ticket with Google, they gave me the following guidance. Upon implementing the new sample XML, I was able to create a new shared contact with a title. That met my needs.
Here is what I received:
In regard to the issue you are experiencing I was able to test and
replicate the behavior that you are encountering. Whenever I follow
the example the Shared Contact is created but part of the contact
information is not complete. I will proceed to report this immediately
in order to update the Article that you are referring.
After investigating and running additional tests, I was able to make
the API work as expected and I was able to add a Domain Shared Contact
with most of the details. I noticed that the Domain Shared Contacts
API uses Google Data APIs to push the information to your domain. I
was able to find an official example from the Google Data APIs and it
seems to work as expected. You can check the example that I am
referring here
https://developers.google.com/gdata/docs/2.0/elements#examples
Below I am including the example that I used as a reference (Note that
I removed the "organization" part from the example provided on the
link above):
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/contact/2008#contact'/>
<title>Eliza Benne</title>
<content>My good friend, Liz. A little quick to judge sometimes, but nice girl.</content>
<gd:email rel='http://schemas.google.com/g/2005#work' primary='true' address='lizi#gmail.com'/>
<gd:email rel='http://schemas.google.com/g/2005#home' address='lizi#example.org'/>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>
(206)555-1212
</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>
(206)555-1213
</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#mobile'>
(206) 555-1212
</gd:phoneNumber>
<gd:im rel='http://schemas.google.com/g/2005#home'
protocol='http://schemas.google.com/g/2005#GOOGLE_TALK'
address='lizi#gmail.com'/>
<gd:postalAddress rel='http://schemas.google.com/g/2005#work' primary='true'>
1600 Amphitheatre Pkwy
Mountain View, CA 94043
</gd:postalAddress>
<gd:postalAddress rel='http://schemas.google.com/g/2005#home'>
800 Main Street
Mountain View, CA 94041
</gd:postalAddress>
</entry>
You should be able to use the above example and add external contacts
to your Shared Contacts directory. I will be more than happy to over
the steps with you to test this and make sure that the API is working
as expected. Note: Please make sure you are using GData-Version: 3.0.

WSO2 claim configuration

I do my first steps with WSO2 (Version 5) and I do not understand the claim mapping.
Currently the travelocity.com application works fine. I can login and afterwards I'am redirected to the home page of the travelocity application - everything is fine.
No I would like the send different SAML assertions as response the the travelocity- appl.
Therefore I have added "Identity Provider Claim URIs" to the claim configuration (email and roles).
What is not clear for me is, that there is only one select field "Subject Claim URI".
When I select the email URL, than in the SAML- Response is the following line:
<saml2:Subject>
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:name">email#email.com</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData InResponseTo="0"
NotOnOrAfter="2014-08-30T09:18:56.447Z"
Recipient="http://localhost:8080/travelocity.com/samlsso-home.jsp"
/>
</saml2:SubjectConfirmation>
</saml2:Subject>
when I choose role- URL as Subject Claim URI, than I get the roles:
<saml2:Subject>
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:name">admin,xccx,asqs,Internal/identity,Internal/travelocity.com,Internal/everyone</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData InResponseTo="0"
NotOnOrAfter="2014-08-30T09:18:56.447Z"
Recipient="http://localhost:8080/travelocity.com/samlsso-home.jsp"
/>
</saml2:SubjectConfirmation>
</saml2:Subject>
But I will get both in the SAML Response.
What I am doing wrong.
Thanks a lot for any help and all the best!!
You have to use Requested Claims to get claims in the SAMLAssertion. The subject claim is the username your application is expecting.

Mandrill in ColdFusion

I am trying to use Mandrill with ColdFusion 6.1. ColdFusion is not one of Mandrell's supported languages. I am pretty sure I need to use cfhttp and Post. Are there any resources or example to help me along.
I'm surprised that no one has released a CFC yet (and had previously tweeted about it), but the API is pretty simple. For example, you can communicate to Mandrill directly using javascript.
https://bitbucket.org/mailchimp/mandrill-api-js/
Mandril uses a restful API. Here's a link to the full documentation:
https://mandrillapp.com/api/docs/
In order to send a message, you need to POST a JSON packet using your own API key. (In the demo link, you can modify the JSON and click the "try it" button to send a test message.)
https://mandrillapp.com/api/docs/messages.JSON.html#method-send
You may need to manually generate your own JSON as ColdFusion tends to convert numbers and boolean values into strings.
You can simply use a cfmail tag and set the smtp username and password to the values provided by Mandrill. They have a full set of documentation on using SMTP with Mandrill.
Here's some sample code:
<cfmail
from="you#you.com"
subject="Your subject line"
to="him#him.com"
type="HTML"
server="smtp.mandrillapp.com"
port="587"
username="yourusername"
password="yourkey"
>
<cfmailparam name="X-MC-Tags" value="Some tag to track in Mandrill" />
<cfmailparam name="X-MC-Track" value="opens,clicks" />
<cfmailparam name="X-MC-Autotext" value="false" />
<html>
<head>
<style type="text/css">
</style>
</head>
<body>
A whole lot of body content goes here.
</body>
</html>
</cfmail>

Non-Authenticated FreeMarker page in alfresco share

i have create a new page in alfresco share but the page cannot be displayed without login! how can i make this page enabled without login.
my file in "/alfresco/templates/blog/demo/custom-viewer.ftl".
and this file contains "custom-viewer.ftl":
<#include "include/alfresco-template.ftl" />
<#templateHeader>
<#script type="text/javascript" src="${url.context}/res/modules/documentlibrary/doclib-actions.js" group="document-details"/>
<#link rel="stylesheet" type="text/css" href="${url.context}/res/components/document- details/document-details-panel.css" group="document-details"/>
<#templateHtmlEditorAssets />
</#>
<#templateBody>
<#region id="web-preview" scope="template"/>
</#>
<#templateFooter>
</#>
and the file in "/alfresco/site-data/pages/custom-viewer.xml".
and this file contains "custom-viewer.xml":
<?xml version='1.0' encoding='UTF-8'?>
<page>
<title>Custom Viewer</title>
<template-instance>custom-viewer</template-instance>
<authentication>none</authentication>
</page>
the page is work correctly but i need it to work without login? any help please?!!
The thing is probably not your page which needs login but the components it's including.
I'm seeing component regioun web-preview, if this defaults to the default web-preview: site-webscripts\org\alfresco\components\preview\web-preview.get.desc.xml
Then this components needs authentication, there is no <authentication> tag, so it defaults to user.
If you delete that <#region....> tag, you'll see the page.

Sitecore send workflow emails

I want to configure Sitecore Workflow engine for email sending.
I had a look into the "Email Action" implementation using Reflector,
It reads "mail server" from argument as follows.
string host = this.GetText(innerItem, "mail server", args);
Don't we need to provide credentials(Username/Password) for mailserver? Or does it take mail configuration from the webconfig?
I have not tried email sending with Workflow yet, Please help me to configure email sending module.
Thanks
Sitecore reads the mailserver settings from the following properties in the web.config:
<setting name="MailServer" value="your.mailserver.com" />
<!-- MAIL SERVER USER
If the SMTP server requires login, enter the user name in this setting
-->
<setting name="MailServerUserName" value="" />
<!-- MAIL SERVER PASSWORD
If the SMTP server requires login, enter the password in this setting
-->
<setting name="MailServerPassword" value="" />
<!-- MAIL SERVER PORT
If the SMTP server requires a custom port number, enter the value in this setting.
The default value is: 25
-->
<setting name="MailServerPort" value="25" />
This should be enough to send emails from Sitecore and webforms.
Yes. It reads your mail settings from the web.config. In addition to all of the Sitecore mail settings you need to configure you should also add the generic ASP.NET mailSetting at the bottom of your web.config.
<system.net>
<mailSettings>
<smtp>
<network host="127.0.0.1" />
</smtp>
</mailSettings>
</system.net>