Useful SharePoint answers, trial and error SharePoint experience blogged

CLI for Microsoft 365 caveats when using certificate login

CLI for Microsoft 365 caveats when using certificate login

There is an article dedicated to using the CLI with your own identity, and you should have a look at it and see if it can help you. Many of the cases we've seen in the Github issues is that people forget to set the "OFFICE365CLI_AADAPPID" or "OFFICE365CLI_TENANT" environment variables. Setting these variables could be as easy as adding them before your command on the bash command line like `OFFICE365CLI_AADAPPID=value1 OFFICE365CLI_TENANT=value2 o365 command` (see #1532 or #1496)


Azure Cosmos DB MongoNetworkError when local development

Azure Cosmos DB MongoNetworkError when local development

Note that this is not enough if you'd like to connect from your developer machine (http://localhost:3000 or http://127.0.0.1:3000). A new instance of Azure Cosmos DB has its firewall enabled for selected networks by default. You will have to add your local IP to the range of the selected network of IPs so to access it


PowerAutomate and SharePoint OData filter queries

PowerAutomate and SharePoint OData filter queries

PowerAutomate has excellent actions related to SharePoint lists operations like getting, update, and create list items. The PowerAutomate guys introduced 'Filter Query' along with the 'Order by' and 'Top Count' as advanced features to these actions. The 'Filter Query' feature comes handy and can save me overcomplicating the PowerAutomate flow


AudienceUriValidationFailedException SharePoint token error

AudienceUriValidationFailedException SharePoint token error

You might get an error of type AudienceUriValidationFailedException when you are trying to access a SharePoint APIs securely using Microsoft Identity platform Azure AD OAuth2 authorization flow. In my case, I was trying to get an access token using a refresh token and use it with the SharePoint APIs from Postman. However, I got the following error


File not found for HTML or ASPX pages in SharePoint Document Library

File not found for HTML or ASPX pages in SharePoint Document Library

Create a simple HTML page with basic HTML in it, like the code snippet below. Rename it to test.aspx. The ASPX extension will allow the page to render in SharePoint as regular HTML. Lower your permissions to Member. Upload the page to a site Document Library


How to create SharePoint LinkedIn like user profile directory

How to create SharePoint LinkedIn like user profile directory

Stakeholders keep asking me how they can get people or users directory in SharePoint where they can search for users by skills, certificates, job deliverables and more. Usually they ask for Delve and how they or we can extend it, but due to lack of any updates, clear roadmap and good extensibility options for Delve, I just cannot recommend it. Here are the basics of what is needed to bring LinkedIn like experience to employees in SharePoint using the SPFx, User Profiles and Search Service.


Resize SharePoint Online image by using the Microsoft Graph APIs

Resize SharePoint Online image by using the Microsoft Graph APIs

The thumbnails Microsoft Graph API can be utilized for resizing images hosted in SharePoint in case we need one rendered in different resolution for our custom application, SharePoint Framework web part or even Microsoft Teams app. The thumbnails api can be used to get thumbnail for SharePoint site page or file stored in document library as well.


The SPListItem being updated was not retrieved with all taxonomy field

The SPListItem being updated was not retrieved with all taxonomy field

Recently me and my team deployed SharePoint site in Office 365 that is for business in Argentina. When we attempted to update list item taxonomy field using the REST API ValidateUpdateListItem we got error in return "The SPListItem being updated was not retrieved with all taxonomy fields" .


Record page hit when SPA page transitioning in modern SharePoint sites

Record page hit when SPA page transitioning in modern SharePoint sites

Recently, SharePoint page transitioning has changed from server-side page load to offline first, client-side page transitioning. There is page router component working on the client that handles the page transitioning and, in many cases, modern SharePoint site works as a single page application. This changed the state of the app customizers where onInit event of the customizer does not fire with page transition anymore. So, how we record page hit then?


The CreateCopyJobs API, copy or move SharePoint files or folders

The CreateCopyJobs API, copy or move SharePoint files or folders

This is overview on how the Office 365 CreateCopyJobs API (/_api/site/CreateCopyJobs) works from my observations. For the past months we are seeing new Copy and Move buttons on the SharePoint modern document library actions bar. The APIs behind can copy or move files or folders across different SharePoint site collections or to OneDrive for Business. Here is what I discovered about the APIs.