Skip to main content

Posts

Custom Connector Deployment

In continuation to my previous blog on custom connector . Here is the blog on how to deploy connector to a new environment. To move custom connectors from one environment to another. We have to perform 3 different actions. 1.        Adding connectors to Solutions. 2.        Exporting solutions   3.        Importing solutions in new environment. Click here to visit Power Automate Portal. Login with admin user credentials.         •    Click on the “Solutions” tab on the left panel. Please refer image below.     Note: Custom connectors created outside solutions cannot be added to solutions at this time.   Adding a connector to a solution To add Custom Connector to Solutions below steps are to be followed. •        Click on New Solution on top ribbon. Enter necess...

Power Automate Customer Connectors

Recently I came across a requirement to create an interface between SharePoint and 3rd party project management tool. Click here  login with your Ofice365 account. Click on Data > Custom Connector menu option from left navigation pane. Click on "New Custom Connector" from top right corner. Select Create from blank. You can now see a new connector creation screen. General Tab Provide the host URL and API end point URL. Click on "Security" tab select the authentication method that the source tool is using. Security Tab Based on your selection rest of the input controls will be be shows, Lets assume you have selected 0Auth 2.0. You should now see columns like  Client ID : is id from app registered in project management tool to consume API.  Client Secret : is a secret key generated by the source from where you are to consume API. Authorization URL : is token generation endpoint URL.  Token URL : is Refresh token URL. Scope : Specify if the API documentation has ...

SPFx File Upload using Pnp

Today I came across a requirement to upload file to SharePoint Document library. This task was to be done using SPFx. Pnp helped me with this. Here is the code i used. Below is the code for uploading file and meta data. private   UploadFile ():  void  {          let   input  = < HTMLInputElement >  document . getElementById ( "fileUpload" );          let   files  =  input . files ;          for  ( let   index  =  0 ;  index  <  files . length ;  index ++) {              const   file  =  files [ index ];              if  ( file . size <=  10485760 )    {      //upload...

MS Flow Check if List Item has Attachment

Today I was working with an MS Flow, Flow was responsible to trigger email when List Item was added and then delete it. While working on this, I faced issues with checking if List Item has Attachments. Flow has an inbuilt option to check "Has Attachment" column value. I don't know why but somehow it didn't work for me. So, as an workaround. I used "Get Attachments" action. Later, In next step we will be checking if "Get Attachment" returns something in body. So, If "Get Attachments" body has length of 0 or more. Based on this we can take further actions. Thanks, Keyur

Fetch outlook Calendar Events in SharePoint Webpart

Today I came across a requirement to get outlook events to SharePoint custom webpart. Thanks to Graph API to ease the work. Here are the steps that we need to follow in order to get events. 1. Register a new app in Azure Active Directory . Here is the blog that i referred. 2. Now its time to get access token using generated client id and secret in previous step. Execute below code to get access token. $.ajax({     type: "POST",     crossDomain: true,     url:       "https://cors-anywhere.herokuapp.com/https://login.microsoftonline.com/<Tenant ID>/oauth2/v2.0/token",     headers: {       "content-type": "application/x-www-form-urlencoded"     },     data: {       grant_type: "client_credentials",       client_id: "", //ClientId@TenantId ...