Posts

Showing posts with the label Graph API

How to Create a Delegated Custom Connector in Power Platform to Call Microsoft Graph API

Image
When working with Microsoft Graph API inside Power Automate or Power Apps, many developers face this error: /me request is only valid with delegated authentication flow.   This happens because the HTTP connector with client credentials only works with application permissions , which do not provide a user context. If you need to call Graph API endpoints like /me , /me/messages , or /me/events , you must use delegated authentication . The best way to achieve this in Power Platform is by creating a Custom Connector with OAuth2 delegated flow . Step 1: Register an App in Azure AD  (Refer for more details: https://mspowerplatformtips.blogspot.com/2025/04/step-by-step-guide-power-automate.html ) Go to Azure Portal → Azure Active Directory → App registrations → New registration . Give your app a name (eg: Graph API Power Automate). Save the app and note down: Application (client) ID Directory (tenant) ID Step 2: Configure API Permissions In your register...

Step-by-Step: Give Unique Permissions to OneDrive Files Using Power Automate and Graph API (No Premium License Needed)

Image
We are uploading files through Power Apps using the Attachment control. In the backend, a Power Automate flow uploads these files to OneDrive and assigns unique permissions . Since Power Automate does not have a built-in connector to directly assign unique permissions in OneDrive, we are handling this through the Microsoft Graph API (without using a custom connector). Step 1: Create a Blank Power Apps Application Open Power Apps Studio. Select New app > Start with a page design as shown below. Step 2 :  select Blank Canvas  Step 3: Add an Attachment Control In Power Apps, the Attachment control is not available directly from the standard controls list. To get the Attachment control: Add an Edit Form to your app. Connect the form to a SharePoint list . Once connected, the form will automatically include the Attachments field. You can then use this Attachment control to upload files. Step 4: Keep Only the Attachment Control Since we only need th...