Office Graph
169 TopicsFacing issue for Outlook calendar Sync with PHP
When using Microsoft Graph Explorer, and making request, it’s returning the events data correctly. But when in code we generate access token, it’s not able to make request and there is some permission issue, So, the access token we are generating through code as per the official Microsoft documentation, isn’t having the required permission, even though we are specifying the required permission array as scope when making request for access token. Below is the code, I am using public function authorize() { $auth_url = $this->Microsoft_calendar_model->createAuthUrl(); redirect($auth_url); } public function createAuthUrl() { $authorize_url = "{$this->auth_base_url}/{$this->tenant_id}/oauth2/v2.0/authorize"; $queryParams = http_build_query([ 'client_id' => $this->client_id, 'response_type' => 'code', 'redirect_uri' => $this->redirect_uri, 'scope' => implode(' ', $this->scopes), 'response_mode' => 'query', 'prompt' => 'consent' ]); return "{$authorize_url}?{$queryParams}"; } // User is getting prompt for permission consent and even though accepting all permissions isn't working public function callback() { $code = $this->input->get('code'); // I am getting the code here. $access_token = $this->microsoft_calendar_model->fetchAccessTokenWithAuthCode($code); } Issue occurs in the below function public function fetchAccessTokenWithAuthCode($code) { $token_url = "{$this->auth_base_url}/{$this->tenant_id}/oauth2/v2.0/token"; $client = new \GuzzleHttp\Client(); $response = $client->post($token_url, [ 'headers' => [ 'Content-Type' => 'application/x-www-form-urlencoded' ], 'form_params' => [ 'client_id' => $this->client_id, 'client_secret' => $this->client_secret_value, 'redirect_uri' => $this->redirect_uri, 'code' => $code, 'grant_type' => 'authorization_code', 'scope' => 'offline_access Calendars.ReadWrite' ] ]); $tokenData = json_decode($response->getBody()->getContents(), true); $tokenContext = new AuthorizationCodeContext( $this->tenant_id, $this->client_id, $this->client_secret_value, $tokenData['access_token'], $this->redirect_uri ); $graphClient = new GraphServiceClient($tokenContext, $this->scopes); $events = $graphClient->me()->calendars()->byCalendarId('primary')->events()->get()->wait(); pre($events); } What I'm doing wrong, I can't figure it out anywhere?33Views0likes0Comments500 Internal Server Error when trying to access the Microsoft Graph API for Viva Engage
I am experiencing an issue when trying to access the Microsoft Graph API for Viva Engage: https://learn.microsoft.com/en-us/graph/api/resources/community?view=graph-rest-1.0 Every time I make an API request, I receive a 500 Internal Server Error response. Here are the steps I have taken so far: Created an App Registration in Azure AD. Assigned the Community.ReadWrite.All permission as per the documentation. Ensured that the token we are using includes the correct and valid permissions. Despite completing these steps, the error persists. Below is a screenshot of the error encountered when testing the API using Postman: Are there any steps I might have missed, or is the API currently experiencing issues?48Views0likes0CommentsCorrelation between Microsoft Graph Events and bookingBusiness Appointments
Hi everyone, I'm struggling with getting complete attendee information from calendar events. I can successfully get event details from the /events endpoint, but it lacks full attendee information and other details compared to the bookingBusiness/account-id/appointments endpoint. The problem is, I can't find a way to correlate and event and its various ID's and a booking appointment ID. Is there a recommended way to get full attendee details while working with calendar events? Any help would be appreciated!36Views0likes0CommentsReorder Teams Channel tabs, move a 3rd tab to be the last tab?
I have an automate power automate flow which Create a Teams site, channels & tabs. now inside the General channel, we add the following custom tabs (Active DashBoard, Incident -12: Tasks and Template & training), as follow:- but i will get those 3 built-in tabs; Posts, Files and Notes.. now how i can move the Notes tab to be last tab ? using Graph API? Thanks58Views0likes0CommentsGet-MgProfile : The term 'Get-MgProfile' is not recognized as the name of a cmdlet, function, script
Hi everyone, The cmdletGet-MgProfile is no longer available after updating to v2.1.0 Even the link is no longer available: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.people/get-mguserprofile What is the replacement Graph SDK cmdlet to get the existing Microsoft Graph PowerShell SDK connection profile name? Thanks in advance.14KViews1like5CommentsIssue with Empty From.User Property in Microsoft Graph API Chat Messages
Issue Summary: I’m working with the Microsoft Graph API to retrieve chat messages, and I’m encountering an issue where theFrom.Userproperty is consistently empty. Despite having the necessary permissions (User.Read.AllandChat.Read.All), the API response does not include the expected user information in theFrom.Userfield. Details: API Permissions:User.Read.All,Chat.Read.All Endpoint:Retrieving chat messages usingGet-MgChatMessage Observed Behavior:TheFrom.Userproperty is always empty, with bothDisplayNameandIdfields returningnull. Steps Taken: Verified API permissions. Inspected the raw JSON response, which also shows emptyFrom.Userfields. Checked the Microsoft Graph API documentation for any notes on this behavior. Example Response: { "From": { "Application": { "DisplayName": null, "Id": null }, "Device": { "DisplayName": null, "Id": null }, "User": { "DisplayName": null, "Id": null } }, "CreatedDateTime": "2024-09-24T15:11:50Z", "Id": "1727190710868", "Body": { "Content": "<systemEventMessage/>", "ContentType": "html" } } Has anyone encountered a similar issue or can provide insights on why theFrom.Userproperty might not be populated? Thanks88Views0likes0CommentsGet file details attached to email
Hello Team, I woud like to know if API : `GET /me/messages/{id}/attachments/{id}` can return list of all type of attachements i.e Local attached file File shared from one drive business File shared from share point Also, does reponse will give the location of the file ( i.e sharepopint and ODB url ) , so that user can download them using that link I tried sending sample email to myself and when i tried , I see only local attached file but not other details . Also, response does not contain any location details but encrypted content130Views0likes0CommentsNot all calendars in the "People's calendars" group are included in the list
When I try to get the list of all callendars in the "People's calendar" group some calendars are not included. The API call: me/calendarGroups/{calendargroup Id of peoples-calendar-group}/calendars Calendars which are added by the following steps are not included, but are shown in the OWA client: - Gotohttps://outlook.office.com/calendar/view/week - Click "Add calendar" - Click "Add from directory" - Select your account - Select a person who's calendar you want to add (in my case "John Doe") In outllook it will show you the "John Doe" calendar, but when getting the list via the graph API all other calendars are returned, except for John Doe. How can I retrieve the full list?126Views0likes0Comments$filter by multiple properties
Hi all, Unfortunately, I can't manage to filter according to several properties. I'm currently filtering for a specific value, but I would like to filter using one or two "or" operators or other properties: $filter=assignmentState+eq+'Delivered' e.g.: filter where assignmentstate is 'Delivered' or 'Delivering' or 'etc..' When I follow the documentation I run into errors. https://learn.microsoft.com/de-de/graph/filter-query-parameter?tabs=http Does anyone have experience with multiple filters? RegardsSolved190Views0likes1Comment3004: Specified meeting is not found
HI, I'm trying to get meeting information, and subsequently meeting attendance reports, for a January meeting, but I'm getting this error using the onlineMeetings API. The meeting and its attendance report are correctly visible on the organizer's Teams account, but I get this error using the API. I have made sure that all the information is correct when calling the Graph API. Is anyone facing a similar situation or know how to fix it? Thank you.804Views0likes1Comment