Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action 'Get_Outlook_cal2_events_from_sync_helper_server' fails with Invalid SharePoint Site Address #20

Closed
Tosko4 opened this issue Dec 6, 2024 · 19 comments

Comments

@Tosko4
Copy link

Tosko4 commented Dec 6, 2024

The action Get_Outlook_cal2_events_from_sync_helper_server fails with a 400 error. The error indicates that the provided SharePoint Site Address is invalid.

Error Details

  • Error Message: SharePoint Site Address 'http://<my_ip>:8000/' is not valid
  • HTTP Status: 400 Bad Request
  • Client Request ID: 4e44bf81-1e06-4040-b8ab-c9bcf7e4a6ad
  • Error Body:
    {
      "status": 400,
      "message": "SharePoint Site Address 'http://<my_ip>:8000/' is not valid\r\nclientRequestId: 4e44bf81-1e06-4040-b8ab-c9bcf7e4a6ad",
      "error": {
        "message": "SharePoint Site Address 'http://<my_ip>:8000/' is not valid"
      },
      "source": "sharepointonline-ne.azconn-ne-003.p.azurewebsites.net"
    }

I checked my docker container, which is up and running without any errors or whatsoever. When I access the http://<my_ip>:8000 i get this message which, if I recall correctly, always received:

{
    "detail": "Not Found"
}
@MShekow
Copy link
Owner

MShekow commented Dec 6, 2024

I have no idea. It still works fine with https://ng-outlook-google-calendar-sync.onrender.com/v1

@Tosko4
Copy link
Author

Tosko4 commented Dec 6, 2024

Probably because your service is on https, seems like the security is even tighter.

I got to check your manual on securing it over https

@MShekow
Copy link
Owner

MShekow commented Dec 7, 2024

I did some more digging. Microsoft seems to be updating the Send an HTTP request to SharePoint action to no longer allow non-SharePoint addresses. When you manually type in an https address into the PA action, it will now say "We are unable to find the site address. Please try selecting a site address from the dropdown". And while you can save and run the flow, the action will simply do nothing and fail with the error that you posted.

This change is already present in one tenant that I use (since this Thursday), but not yet in another one (however, I'm expecting it to be rolled out there soon).

I am unsure how to work around this. After all, using the SharePoint HTTP action was kind of a "hack" anyway, so what basically happened was that Microsoft fixed a bug. I tried to simulate the SharePoint API better in the sync helper service, but was unable to get it to work (I tried to emulate the <site-address>/_api/contextinfo endpoint that is called while entering a https address into the action)

So, basically, the flow is broken, and the only way to fix it is to replace the Send an HTTP request to SharePoint action with the HTTP action and to pay for Premium.

@Tosko4
Copy link
Author

Tosko4 commented Dec 7, 2024

I can confirm that using an HTTP action resolved the issue. I needed to update all the variables as well, which took some time, but it’s back up and running now.

It’s unfortunate that Microsoft changed this, as there doesn’t seem to be a straightforward alternative for handling HTTP POST and GET requests. Any thoughts on this?

One possible workaround is to parse a JSON file, upload it via FTP action to a directory on the same VPS, then use a cron job to trigger a Python script. That script could process the file and move it to another directory, signaling that it’s ready. The flow would then detect the processed file via FTP and proceed to sync Google and Outlook calendars.

For those without a premium plan and who don’t want to host their own service, it might be worth resurrecting the old (now deprecated) flow and simply reducing the daily cycles to avoid hitting usage limits.

@MShekow
Copy link
Owner

MShekow commented Dec 7, 2024

@Tosko4 I don't see any other options than those that you mentioned.

  • FTP could be an option, but it would require rewrites of large parts of the code base
  • People could use the old deprecated flow - that flow still works, it's just slow and I won't be adding any features to it anymore

Once I find time, I'll publish an updated version of this NG flow where the Send an HTTP request to SharePoint action is replaced by the Http action. I might ask you to test it, since I don't have premium, nor am I willing to spend money on it, so I can only save but not run it.

@Tosko4
Copy link
Author

Tosko4 commented Dec 7, 2024

I’m happy to test this for you, but I’ve already updated the flows on my side, and they’re working fine. I’ve made a few tweaks to them as well to fit my own work and toolsets used. I can test your version, but unless it introduces something significantly different or more efficient, I don’t see myself using it as my primary solution.

Out of curiosity, do you intend to continue using this flow yourself? If so, how are you planning to address this issue in your setup?

@MShekow
Copy link
Owner

MShekow commented Dec 7, 2024

I can test your version, but unless it introduces something significantly different or more efficient, I don’t see myself using it as my primary solution.

Thank you. I also would not expect you to continue using the next release. For me, a one-time test by you would be sufficient.

I'm pretty sure that the changes will be non-problematic anyway, even if you cannot test it - I'm merely replacing the HTTP-related actions, there's not much that can go wrong.

Out of curiosity, do you intend to continue using this flow yourself?

Nope, I'll have to switch from the NG flow back to a variant of the old/deprecated flow, because the tenant of one of the O365 accounts is very strictly limited, the HTTP doesn't work there (blocked by policy).

@MShekow
Copy link
Owner

MShekow commented Dec 7, 2024

@Tosko4 Could you please test this beta version of v0.3?

@Ghevaria
Copy link

Ghevaria commented Dec 9, 2024

Hi, workflow user here, not a developer :)
Obviously poking around here since I've started having the same issue.
@MShekow can I download and try the v0.3 beta as well?

@MShekow
Copy link
Owner

MShekow commented Dec 10, 2024

@Ghevaria sure, feel free.

@cyrduf
Copy link

cyrduf commented Dec 10, 2024

Hello, after some days without working on the flows, I see also the problem now on:

"L'action « Get_Outlook_cal2_events_from_sync_helper_server » a échoué: SharePoint Site Address 'https://ng-outlook-google-calendar-sync.onrender.com/v1' is not valid clientRequestId"

So I think it's the related problem.

Is it possible without premium plan of microsoft to solve with your v0.3 beta version ?

If yes I will try to use it to check with my microsoft business standard plan if it's ok, because premium plan is not good for me.

Additional question: is it the python server part to be updated also for this problem ?

Because, If yes... I only see the docker way to install this, but I search basic unix commands notes (like for poetry part) to just launch the python requirements install before launching the main.py file (because making quickly test is simpler in this way if it's needed for this v0.3 updates) ?

Thank you
Regards

@MShekow
Copy link
Owner

MShekow commented Dec 11, 2024

@cyrduf

Yes, you have the same problem as the others here.

No, v0.3 only works with Premium, nothing we can do about it - Microsoft has all the power and wants to bleed you dry xD

No, the Python server won't be updated, as the server is not the problem.

If you must have a calendar sync that works without premium, you must use the deprecated flows (https://github.com/MShekow/outlook-calendar-sync or https://github.com/MShekow/outlook-google-calendar-sync)

@cyrduf
Copy link

cyrduf commented Dec 11, 2024

@MShekow
Thank you for your answers.

I will check older version and also I will attempt to understand the server to think about perhaps another way to use it with NG and no premium. (ok it's impossible but...)

So, I’d appreciate any tips on hosting the files myself firstly locally on my VPS and getting the NG flow operational. Not using render.com, but I have my own linux VPS on O2Switch and docker is not supported. Hopefully you can give me some directions on this and which files I need. And how can be done a manual install & launching of the server part that is used by NG flows.

My last try before forgetting NG flows :) So if you can help on this, it would be great.

@MShekow
Copy link
Owner

MShekow commented Dec 11, 2024

@cyrduf I'm afraid I can't support any self-hosting efforts, be it with or without Docker.

Anyways, if you don't invest in Power Automate Premium, you won't be able to make any HTTP calls, and therefore won't be able to call a self-hosted server. So why waste time figuring out how to self-host it?

@cyrduf
Copy link

cyrduf commented Dec 11, 2024

@MShekow
My idea is to find another techno than HTTP to make the same that server is doing. Perhaps I will find another communication protocol, or a way to embed in power automate, or perhaps I will waste my time.

For that I have just to know how to construct and launch your actual python server without docker.
To be simple it's a requirements.txt file to construct the server and the Linux commands necessary to launch the only part is used by the MS365 block that is now failing.

But perhaps it's not so simple I imagine.

I understand anyway, it was just an idea.

@Tosko4
Copy link
Author

Tosko4 commented Dec 11, 2024

@cyrduf I have posted an idea here #20 (comment)

but that means rewriting the Python code to support this method instead. If I had more time (or no premium, then I’d be forced to make time as I can’t do without this anymore xD)

If you can’t host docker and are not willing to use the service @MShekow hosts or the host where it’s hosted on, then I suggest you to look at the deprecated version. It is still good, and it’s unfortunate he called it deprecated as I’ve used that for weeks (months maybe) and it works as well, without premium too. Only takes a bit longer in each run but who cares :D

@MShekow my colleague with premium too, tested your beta, and he reported back it works for him.

@MShekow
Copy link
Owner

MShekow commented Dec 12, 2024

@Tosko4 thank you for getting back to me on verifying that the v0.3 beta works. I'll make the update official (including updating the blog post) in the coming days.

Regarding the term "deprecated": I'll think about how to change the wording to avoid people getting scared off from using it. As you said, the previous "deprecated" flows work just fine, and probably will continue to work. What I wanted to express with "deprecated" is that I'm no longer supporting/maintaining it. Consequently, I'm not going to add any feature someone asks for in the deprecated flows. When I do the v0.3 release I'll make this note in the other GitHub repos / blog posts more clear.

And since I'm no longer using this NG flow anymore, I will have to add a similarly phrased note it, too. I have many open-source projects and need to focus my efforts on those that are still useful to me.

@Tosko4
Copy link
Author

Tosko4 commented Dec 12, 2024

I understand and I don’t mind you using it. I understand.

Maybe some thoughts: End-of-Support or Unmaintained

@MShekow
Copy link
Owner

MShekow commented Dec 14, 2024

READMEs and blog posts were updated. Closing this issue.

@MShekow MShekow closed this as completed Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants