tomaskovacik / MeetEasier

MeetEasier is a web application that visualizes meeting room availability. It works using Exchange Web Services (EWS) with Exchange room lists in Office 365.
GNU General Public License v3.0
1 stars 1 forks source link

What for settings to book, cancel a meeting... #9

Closed michaelortnersanube closed 9 months ago

michaelortnersanube commented 1 year ago

Hello,

i get an error if i want to extend a booking or make a booking of a meeting:

` oute Room Booking besprechungsraum@example.com | Besprechungsraum 1 | 2023-05-17T11:45:24.702Z | 2023-05-17T12:15:24.702Z | BookNow Error: Cannot find module '../../config/auth/auth.js' Require stack:

fkmeland commented 1 year ago

I don't think we implemented room-booking in ews, It might need more work. Are you using this against an on-prem exchange? If not, you should be using the msgraph implementation.

auth.js and config.js is basicly the same file just: https://github.com/tomaskovacik/MeetEasier/blob/2234bca31241d46ebb73815002a868a365a9b5aa/config/auth.js

michaelortnersanube commented 1 year ago

Hello Sir,

we use Microsoft 365 and have made all settings like here: https://github.com/probits-as/MeetEasier

We see the room, but if we want End it our extend it, it throws the error on the first post. Maybe i have something missunderstood?

fkmeland commented 1 year ago

Aah, try replacing app/routes.js with this file: https://github.com/probits-as/MeetEasier/blob/feat/roombooking/app/routes.js

The problem is that the route /api/roombooking is using the wrong client, it's using the ews and not msgraph.

michaelortnersanube commented 1 year ago

Hello Sir,

first: Thanks for your help.

Second: I have replaced routes.js file with the file that you have send me and made following:

npm run build npm start

and then go to the web appliance. I tried to End a Meeting, its not working. Next error:

Error: Cannot find module './msgraph/roombooking.js' Require stack:

fkmeland commented 1 year ago

Ok, not sure what the status is here on booking in this fork, I have a feature branch with booking that should work, again it's just a POC.

You need theese files too in app/msgraph folder: https://github.com/probits-as/MeetEasier/blob/feat/roombooking/app/msgraph/graph.js https://github.com/probits-as/MeetEasier/blob/feat/roombooking/app/msgraph/roombooking.js

michaelortnersanube commented 1 year ago

Hello Sir,

we are close to the end of finding the problem :D

Now following error comes:

Route Room Booking besprechungsraum@example.at | Besprechungsraum 1 | 2023-05-25T12:00:00.000Z | 2023-05-25T12:07:36.765Z | EndNow GraphError: Access is denied. Check credentials and try again. at new GraphError (/home/MeetEasier/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.js:34:28) at Function.GraphErrorHandler.constructErrorFromResponse (/home/MeetEasier/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js:62:22) at Function. (/home/MeetEasier/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js:89:48) at step (/home/MeetEasier/node_modules/tslib/tslib.js:144:27) at Object.next (/home/MeetEasier/node_modules/tslib/tslib.js:125:57) at /home/MeetEasier/node_modules/tslib/tslib.js:118:75 at new Promise () at __awaiter (/home/MeetEasier/node_modules/tslib/tslib.js:114:16) at Function.GraphErrorHandler.getError (/home/MeetEasier/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js:85:38) at GraphRequest. (/home/MeetEasier/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.js:315:84) { statusCode: 403, code: 'ErrorAccessDenied', requestId: null, date: 2023-05-25T12:07:39.160Z, body: '{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again."}' }

This are the permissions:

image

fkmeland commented 1 year ago

I think you are missing the Calendars.ReadWrite, it should be of type Application and not Delegated.

michaelortnersanube commented 1 year ago

Now working, thanks for the help!

fkmeland commented 1 year ago

No problem, glad you got it working 😊