Subscribing to shared EWS non-GAL calendar

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Subscribing to shared EWS non-GAL calendar

Pete Biggs

Evolution 3.36.2 - EWS/Office365 account

I've recently had to configure my home copy of Evolution to talk to our
Office365 tenancy (for obvious reasons!). It was not pain free, but I
don't think it was totally an issue with Evolution.  The only thing
left is to connect to a shared calendar, but the account with the
shared calendar is not in the GAL, so it appears that Evolution won't
subscribe to it.  My personal calendars on my account show up no
problem.

Is there a trick to subscribing to such calendars?  I currently right
click on the *mail* account in the left bar and select "Subscribe to
folder of another EWS user...", enter the username in the box and
select a folder name of "Calendar" and it just comes up with "User was
not found on the server" - I've tried all forms of the username (i.e.
name, name@address, name@emailaddress and so on).  Clicking on the
'Choose...' button doesn't show the user, but it does show lots of
similar ones, but that's not surprising as it isn't in the GAL.

Does the subscription process check for the user in the GAL before
subscribing?  Can I tell it not to?

Any pointers would be gratefully received so I don't have to use
Office365 on the web.

P.


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Subscribing to shared EWS non-GAL calendar

Gnome Evolution - General mailing list
On Fri, 2020-05-22 at 12:10 +0100, Pete Biggs wrote:
> Does the subscription process check for the user in the GAL before
> subscribing? Can I tell it not to?

        Hi,
evolution-ews searches for the contact, to verify it exists. The only
way to not let it do it is to pick the user from the search dialog, but
that also shows users only from the Active Directory, thus it's a no
go.

It would be possible to workaround this by adding a foreign folder for
a different user, then modify its definition to point to the folder of
the user not being in the GAL.

Edit the attached getfolder.xml and write a full email address instead
of its current [hidden email]. Then run this command, from a folder
where this file is saved (replace USER:PASS with your credentials):

   $ curl -v -k --user USER:PASS -X POST -d @getfolder.xml \
        https://outlook.office365.com/EWS/Exchange.asmx \
        --header 'Content-Type: text/xml; charset=utf-8'

which, if everything will work properly, will return something like
this (heavily stripped here):

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  ....
            <t:CalendarFolder>
              <t:FolderId Id="AAMkAD.....NAAA=" ChangeKey="....."/>
              <t:ParentFolderId Id="AAMkAD.....IAAA=" ChangeKey="...."/>
              <t:FolderClass>IPF.Appointment</t:FolderClass>
              <t:DisplayName>Calendar</t:DisplayName>
              <t:TotalCount>2</t:TotalCount>
              <t:ChildFolderCount>1</t:ChildFolderCount>
            </t:CalendarFolder>
  ....
</s:Envelope>

from which you want the FolderId only, the part of the Id="xxxx"
(without the quotes).

Then search the ~/.cache/evolution/sources/ for the .source file, which
contains the information about the folder for the other user you
subscribed to earlier. Maybe search with part of the display name you
see in Evolution UI, ow with anything unique; eventually search for
"Foreign=true" (quotes for clarity only), which should limit the list
of sources a bit. When you have it, then at the top it'll look like
this:

   [Data Source]
   DisplayName=User — Calendar
   Enabled=true
   Parent=......

where you might want to change the DisplayName value to reflect what
the calendar shows. This is used in the GUI. Then search for:

   [Exchange Web Services Folder]
   ChangeKey=
   Id=....
   Foreign=true
   ....

where you'll replace the Id value with the one the curl command
returned. In this case it would be:

   Id=AAMkAD.....NAAA=

When you finally save the .source file run:

   $ evolution --force-shutdown

which will restart also background processes, thus they know about the
changes. Then you might see the other calendar.
        Bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list

getfolder.xml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Subscribing to shared EWS non-GAL calendar

Pete Biggs
On Mon, 2020-05-25 at 11:30 +0200, Milan Crha via evolution-list wrote:

> On Fri, 2020-05-22 at 12:10 +0100, Pete Biggs wrote:
> > Does the subscription process check for the user in the GAL before
> > subscribing? Can I tell it not to?
>
> Hi,
> evolution-ews searches for the contact, to verify it exists. The only
> way to not let it do it is to pick the user from the search dialog, but
> that also shows users only from the Active Directory, thus it's a no
> go.
>
> It would be possible to workaround this by adding a foreign folder for
> a different user, then modify its definition to point to the folder of
> the user not being in the GAL.

Many thanks for the detailed reply.

>
> Then search the ~/.cache/evolution/sources/ for the .source file, which
> contains the information about the folder for the other user you
> subscribed to earlier.

A different copy of Evolution (on my work desktop) is subscribed to the
calendar and a .source file exists in the .cache/evolution/sources
folder that references it. Can I just copy that file to my home
machine?  Is there a dconf key or something that I need to set for
Evolution to see it?

Also, I thought that all .cache files were disposable - is that the
only place the accounts are configured? I can't find a reference to the
calendar or the .source file in ~/.config/evolution/sources folder on
my work desktop (which was where I looked originally).

Thanks again.

P.

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Subscribing to shared EWS non-GAL calendar

Gnome Evolution - General mailing list
On Mon, 2020-05-25 at 13:58 +0100, Pete Biggs wrote:
> Can I just copy that file to my home machine?

        Hi,
yes, but make sure the Parent=..... at the top will match the Parent
from the other .source files in that "destination" directory. That's
how it knows to which account it belongs.

> Is there a dconf key or something that I need to set for
> Evolution to see it?

No, just run:

   $ evolution --force-shutdown

to have evolution-source-registry (and the rest) restarted.

> Also, I thought that all .cache files were disposable

Yes, +/- some non-obvious exceptions [1], like these subscribed
(foreign) folders. All the rest are discovered on
evolution-source-registry start  (and some other events/occasions),
thus if you drop them from the ~/.cache then it doesn't hurt.

>  is that the only place the accounts are configured?

Two places, ~/.config/evolution/sources and
~/.cache/evolution/sources/.

> I can't find a reference to the calendar or the .source file in
> ~/.config/evolution/sources folder on my work desktop (which was
> where I looked originally).

I'm not sure which one you mean. Being it the account the foreign
.source at the top belongs to, then it's the Parent=.... value there.
You'll see something like Parent=xxx, then the file is
~/.config/evolution/sources/xxx.source
In fact, the directory name in the ~/.cache/ is also named xxx for the
discovered sources of that account.
        Bye,
        Milan

[1] * https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/150
    * also message user flags, which cannot be saved on the server

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Subscribing to shared EWS non-GAL calendar

Pete Biggs
On Mon, 2020-05-25 at 15:17 +0200, Milan Crha via evolution-list wrote:
> On Mon, 2020-05-25 at 13:58 +0100, Pete Biggs wrote:
> > Can I just copy that file to my home machine?
>
> Hi,
> yes, but make sure the Parent=..... at the top will match the Parent
> from the other .source files in that "destination" directory. That's
> how it knows to which account it belongs.

Yup. That worked. Thanks a lot.  I can now see all the meetings I'm
going to miss :-)

Do you think that not being able to subscribe to non-GAL accounts would
be considered a bug?

P.



_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Subscribing to shared EWS non-GAL calendar

Gnome Evolution - General mailing list
On Mon, 2020-05-25 at 15:01 +0100, Pete Biggs wrote:
> Do you think that not being able to subscribe to non-GAL accounts
> would be considered a bug?

        Hi,
I do not recall why I made there the need to have the contact known in
GAL. If it's not a requirement on the server side (anymore?), then the
code can be relaxed. Feel free to file a bug against evolution-ews,
thus there's some history behind the change:
https://gitlab.gnome.org/GNOME/evolution-ews/issues/new

I'd probably just drop the email verification from the code. If anyone
is unsure, he/she can click the button to search for the address in the
GAL, instead of typing precisely the email address.
        Bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Subscribing to shared EWS non-GAL calendar

Pete Biggs
On Mon, 2020-05-25 at 16:12 +0200, Milan Crha via evolution-list wrote:

> On Mon, 2020-05-25 at 15:01 +0100, Pete Biggs wrote:
> > Do you think that not being able to subscribe to non-GAL accounts
> > would be considered a bug?
>
> Hi,
> I do not recall why I made there the need to have the contact known in
> GAL. If it's not a requirement on the server side (anymore?), then the
> code can be relaxed. Feel free to file a bug against evolution-ews,
> thus there's some history behind the change:
> https://gitlab.gnome.org/GNOME/evolution-ews/issues/new
>

Bug is filed at

 https://gitlab.gnome.org/GNOME/evolution-ews/-/issues/103

P.


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list