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

Microsoft Teams No invite link in email - Self Hosted #3854

Closed
CodingRockz opened this issue Aug 15, 2022 · 14 comments · Fixed by #4910
Closed

Microsoft Teams No invite link in email - Self Hosted #3854

CodingRockz opened this issue Aug 15, 2022 · 14 comments · Fixed by #4910
Labels
🐛 bug Something isn't working

Comments

@CodingRockz
Copy link

Issue Summary

We are using Cal.com on a self hosted instance.

The email invites do not have any MS Teams invite or URL. The location shown is "Office365_Video".

Steps to Reproduce

  1. Cal.com self hosted
  2. Add Office365 Teams app
  3. Create an event with location as MS Teams
  4. Book a meeting and receive invite with no MS Teams link
@CodingRockz
Copy link
Author

is this ever going to be fixed? No one even bothering to respond...

@PeerRich
Copy link
Member

hey @CodingRockz, we are currently working at full force to release our version 2.0

15 days is not too long of a wait.

we'll investigate why this is happening.

@joeauyeung can you take a look?

@PeerRich PeerRich added the 🐛 bug Something isn't working label Aug 30, 2022
@PeerRich
Copy link
Member

@CodingRockz what version are you running? there has been a few fixes for MS Teams recently

@CodingRockz
Copy link
Author

@CodingRockz what version are you running? there has been a few fixes for MS Teams recently

v1.8.5

Was the version that we installed and tested and have been monitoring for any update on fix for the microsoft meeting invite, and did not see anything till today. The relevant issues all remain open and not closed. Can you please tell me which version has fixed this?

@joeauyeung
Copy link
Contributor

@CodingRockz I tried pinpointing the exact fix and I believe it is #3123. Since it was cherry picked to production I can't pin point to an exact version number.

I can confirm though that it is working in our current version which is v1.9.2

@CodingRockz
Copy link
Author

@CodingRockz I tried pinpointing the exact fix and I believe it is #3123. Since it was cherry picked to production I can't pin point to an exact version number.

I can confirm though that it is working in our current version which is v1.9.2

Thanks mate. I will update to the latest version and check again. Cheers. Will provide an update here once checked.

@CodingRockz
Copy link
Author

@CodingRockz I tried pinpointing the exact fix and I believe it is #3123. Since it was cherry picked to production I can't pin point to an exact version number.

I can confirm though that it is working in our current version which is v1.9.2

Just checked with update version. The issue is still not fixed.

Previously we got the text "Office365_video" under the where part in email. With the updated code, i am getting "MS Teams" text instead now.

However there is no video link to the meeting. Can you please check ?

@joeauyeung
Copy link
Contributor

It's working locally and on production. I would try looking at Azure instance.

Here are some things that I would check:

  • Make sure you're using a work/school Microsoft account to connect to MS Teams
  • On Azure under your app -> authentication make sure the redirect URL is pointing to your self-hosted instance
  • On Azure under app -> API permissions make sure you have "OnlineMeetings.ReadWrite" selected

@CodingRockz
Copy link
Author

CodingRockz commented Sep 1, 2022 via email

@joeauyeung
Copy link
Contributor

I'm going to assume this is for creating new events. If so I would look at packages/core/videoClient.ts line 49. If you want to drill down even more I would look at packages/app-store/office365video/lib/VideoApiAdapter.ts line 137 and add a log on resultObject

@CodingRockz
Copy link
Author

  • OnlineMeetings.ReadWrite

I have checked several times mate. The permissions and redirect url for auth are all correct. Infact, if i remove the teams app from cal and then re-add it, the link generation works for the first event for sometime. Then again it stops working. I believe i have seen others also state the same previously.

@ch-ruetgers-RMH
Copy link

ch-ruetgers-RMH commented Sep 28, 2022

I believe i have seen others also state the same previously.

Yes, has been reported a few times. None of the fixes has been working, still the same malfunction you describe above.

Given how the problem appears, working for a certain time, than not, we assume it's an issue with the token refresh against the Microsoft API.

@PeerRich / @joeauyeung
This is a possible duplicate to

But for sure to

@joeauyeung
Copy link
Contributor

@ch-ruetgers-RMH @CodingRockz thank you for your patience.

I found that the problem was we were missing the offline_access scope when requesting access tokens for MS Teams. Without the offline_access scope the response body did not include the refresh token.

#4910 should address this issue. In your Azure instances you should add offline_access under "API Permissions" for your Cal.com app.

@CodingRockz
Copy link
Author

@joeauyeung I tried to update the code base with the #4910 and latest main code. After this i am unable to access the cal home page on my self hosted install. I now get a 500 error. On the yarn start page, i see this

@calcom/web:start: warn(prisma) Conflict for env vars NEXT_PUBLIC_LICENSE_CONSENT, CALCOM_LICENSE_KEY, DATABASE_URL, NEXT_PUB LIC_WEBAPP_URL, NEXT_PUBLIC_WEBSITE_URL, NEXT_PUBLIC_CONSOLE_URL, NEXT_PUBLIC_EMBED_LIB_URL, NEXTAUTH_DOMAIN, SAML_DATABASE_U RL, SAML_ADMINS, PGSSLMODE, NEXTAUTH_SECRET, NEXTAUTH_COOKIE_DOMAIN, CALCOM_TELEMETRY_DISABLED, CRON_API_KEY, CALENDSO_ENCRYP TION_KEY, NEXT_PUBLIC_INTERCOM_APP_ID, NEXT_PUBLIC_ZENDESK_KEY, NEXT_PUBLIC_HELPSCOUT_KEY, SEND_FEEDBACK_EMAIL, SENDGRID_API_ KEY, SENDGRID_EMAIL, TWILIO_SID, TWILIO_TOKEN, TWILIO_MESSAGING_SID, NEXT_PUBLIC_IS_E2E, API_KEY_PREFIX, EMAIL_FROM, EMAIL_SE RVER_HOST, EMAIL_SERVER_PORT, EMAIL_SERVER_USER, EMAIL_SERVER_PASSWORD, NEXT_PUBLIC_TEAM_IMPERSONATION, MS_GRAPH_CLIENT_ID, M S_GRAPH_CLIENT_SECRET, DAILY_API_KEY in ../../.env and ../../packages/prisma/.env
@calcom/web:start: Env vars from ../../packages/prisma/.env overwrite the ones from ../../.env
@calcom/web:start:
@calcom/web:start: TypeError: Cannot use 'in' operator to search for 'viewer.public.i18n' in undefined
@calcom/web:start: at Object.callProcedure (/home/ubuntu/cal.com/node_modules/@trpc/server/dist/resolveHTTPResponse-6fecf 1e4.js:249:16)
@calcom/web:start: at Object.queryFn (/home/ubuntu/cal.com/node_modules/@trpc/react/dist/ssg/index.js:40:27)
@calcom/web:start: at Object.fetchFn [as fn] (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/query.js:2 53:27)
@calcom/web:start: at run (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/retryer.js:101:31)
@calcom/web:start: at Object.createRetryer (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/retryer.js:1 47:5)
@calcom/web:start: at Query.fetch (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/query.js:308:28)
@calcom/web:start: at QueryClient.fetchQuery (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/queryClien t.js:189:68)
@calcom/web:start: at Object.fetchQuery (/home/ubuntu/cal.com/node_modules/@trpc/react/dist/ssg/index.js:39:28)
@calcom/web:start: at ssrInit (/home/ubuntu/cal.com/apps/web/.next/server/pages/auth/login.js:972:15)
@calcom/web:start: at async getServerSideProps (/home/ubuntu/cal.com/apps/web/.next/server/pages/auth/login.js:887:17)
@calcom/web:start: at async Object.renderToHTML (/home/ubuntu/cal.com/node_modules/next/dist/server/render.js:490:20)
@calcom/web:start: at async doRender (/home/ubuntu/cal.com/node_modules/next/dist/server/base-server.js:908:38)
@calcom/web:start: at async cacheEntry.responseCache.get.isManualRevalidate.isManualRevalidate (/home/ubuntu/cal.com/node _modules/next/dist/server/base-server.js:1013:28)
@calcom/web:start: at async /home/ubuntu/cal.com/node_modules/next/dist/server/response-cache.js:69:36
@calcom/web:start: TypeError: Cannot use 'in' operator to search for 'viewer.public.i18n' in undefined
@calcom/web:start: at Object.callProcedure (/home/ubuntu/cal.com/node_modules/@trpc/server/dist/resolveHTTPResponse-6fecf 1e4.js:249:16)
@calcom/web:start: at Object.queryFn (/home/ubuntu/cal.com/node_modules/@trpc/react/dist/ssg/index.js:40:27)
@calcom/web:start: at Object.fetchFn [as fn] (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/query.js:2 53:27)
@calcom/web:start: at run (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/retryer.js:101:31)
@calcom/web:start: at Object.createRetryer (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/retryer.js:1 47:5)
@calcom/web:start: at Query.fetch (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/query.js:308:28)
@calcom/web:start: at QueryClient.fetchQuery (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/queryClien t.js:189:68)
@calcom/web:start: at Object.fetchQuery (/home/ubuntu/cal.com/node_modules/@trpc/react/dist/ssg/index.js:39:28)
@calcom/web:start: at ssrInit (/home/ubuntu/cal.com/apps/web/.next/server/pages/auth/login.js:972:15)
@calcom/web:start: at processTicksAndRejections (node:internal/process/task_queues:96:5)
@calcom/web:start: at async getServerSideProps (/home/ubuntu/cal.com/apps/web/.next/server/pages/[user].js:497:17)
@calcom/web:start: at async Object.renderToHTML (/home/ubuntu/cal.com/node_modules/next/dist/server/render.js:490:20)
@calcom/web:start: at async doRender (/home/ubuntu/cal.com/node_modules/next/dist/server/base-server.js:908:38)
@calcom/web:start: at async cacheEntry.responseCache.get.isManualRevalidate.isManualRevalidate (/home/ubuntu/cal.com/node _modules/next/dist/server/base-server.js:1013:28)
@calcom/web:start: at async /home/ubuntu/cal.com/node_modules/next/dist/server/response-cache.js:69:36
@calcom/web:start: TypeError: Cannot use 'in' operator to search for 'viewer.public.i18n' in undefined
@calcom/web:start: at Object.callProcedure (/home/ubuntu/cal.com/node_modules/@trpc/server/dist/resolveHTTPResponse-6fecf 1e4.js:249:16)
@calcom/web:start: at Object.queryFn (/home/ubuntu/cal.com/node_modules/@trpc/react/dist/ssg/index.js:40:27)
@calcom/web:start: at Object.fetchFn [as fn] (/home/ubuntu/cal.com/node_modules/@tanstack/query-core/build/lib/query.js:2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants