One of the features in Microsoft 365 which can be overlooked is your User Profile.
Delve User Profile pages contain a lot of information about your business users, including:
- Contact information
- Skills and Expertise
- Schools and Education
- Interests and Hobbies
- Additional Information
When you have accurate data in these fields, it can be a huge benefit to your organization, especially large organizations with multiple locations and/or where a good percentage of people work remotely.
Having users keep profiles up to date, enhances People Search and the ability for users to efficiently find the right resource or expertise.
With accurate data, users can better search for colleagues, whether they’re looking for expertise on a subject, wish to collaborate on a particular project, or just want to see if there is any fellow alumnus in the company!
While what Microsoft provides out-of-the-box is a good start, often we need to enhance the profile with custom fields.
We can do this by adding Custom properties to the User Profile service, making the property searchable, and choosing to display property under the Additional Information section within Delve profiles. The custom property can be edited by administrators from User Profile service or directly by users at the Delve profile page.
Below, I have outlined how to create a new custom user profile property.
If you need any help, please reach out and we’d be happy to answer any questions you may have.
Creating a New Custom User Profile Property
Login to your SharePoint Online admin center and go to Manage User Properties within User Profiles. Select “New Property.”
Assign the new property a Name, and Display Name. Choose the data Type you want property to contain.
When configuring the property, we need to determine how we want the property to behave.
- Should the users be able to hide this property so only they can view it, or should we require it’s shown to Everyone?
- Do we want users to be able to edit this custom property, or only allow Administrators?
These scenarios are managed through your Policy and Edit settings.
To display the custom property in Delve profile page, and to be able to manage it within User Profile service > Manage User Profiles > Edit, enable the setting “Show in the profile properties section of the user’s profile page”.
Select “Show on the Edit Details page” if you want a user to be able to edit the property.
By default, the new custom property will be Indexed by Search service.
After creating a custom property, it will immediately display under Additional Information in your Delve profile pages.
As mentioned, if you need any help with this process, please reach out and we would be happy to answer any questions you may have.
Microsoft Flow is often used so users can consume emails and post their content and attachments into a SharePoint list for processing.
The date and time that an email was received are common metrics that users would like to track in SharePoint lists, and the metadata on the email contains that information. However, when you try to use this field, the date and time that flows into the SharePoint list isn’t the date and time the email was received.
Why Is There an Automatic Timestamp Issue in SharePoint?
The problem stems from the variation in date formatting.
The date and time format that comes back from Exchange emails will resemble the following: 2019-07-02T17:10:36+00:00.
To compare, the date and time format that will be stored in a SharePoint list defaults in the following format: 2019-07-02T17:10:36.0000000Z.
Due to the difference in formatting, if you simply try to store the date and time from Exchange in a SharePoint list without converting it, you will end up getting completely different times than what you would expect.
How to Fix Timestamp Issues with Microsoft Flow
The easiest way to solve this problem is to simply convert the time we receive from the email into the SharePoint friendly format. To do so, we can use the “Convert time zone” action in Microsoft Flow.
By default, the time zone that items come back in is the UTC Coordinated Universal Time and then it is converted into the end-users local time zone from that base.
With this information, you can convert the Base Time (the email’s received time) into the “Round-trip date/time pattern”. Our source time zone and destination time zone will remain the same as we do not want the actual timestamp itself to change.
The output from this action can then be used to store the proper timestamp in a SharePoint list item as shown below and from there the issue has been resolved.
Recently, we came across a problem with a constructed Microsoft Flow that takes incoming emails to a Shared Mailbox and posts the information into a SharePoint list. The Flow picks up on attachments and stores those as attachments in the list item created.
The issue: the majority of people include the company logo in their signature, but the name of the file itself would vary, so there was no way to easily filter out the logo in order to not store it as an attachment. This is where the Azure Custom Vision Intelligence came in – you can easily customize your own computer vision models that fit with your unique use cases.
Here are a few examples of labeled images and how Custom Vision can do the work once it’s set up properly.
Custom Vision Intelligence Overview and Setup
Custom Vision Artificial Intelligence allows you to train an AI to perform certain actions.
In this instance, we will be training our Custom Vision AI to recognize the Timlin Enterprises logo. It will tag the images fed to the AI as being the logo or not being the logo. We can trigger the Custom Vision AI and feed it the image we are curious about in a Microsoft Flow.
To start, navigate to https://www.customvision.ai and sign in or create an account*. Once signed in, we will want to create a New Project. Simply click on “New Project” and fill out the prompt as shown.
*Note: The account you use should be linked to an Azure Subscription that it has access to. Also, in our example, our Resource Group was already created and set to the F0 Plan (Free Plan). During the original creation process of a new Resource Group in Custom Vision AI, it only allows you to create a new resource group under the S0 plan. If you want to avoid any costs, be sure to switch the plan for this resource group to F0 after creation (this will be shown later on in this post). In addition, the resource group must remain as the South Central US location as the functionality we are using is only available in this location currently.
Once you’ve created the project, you want to start off by creating two tags on the left-hand side. One tag can be called “Timlin Logo” and the other can be called “Not Timlin Logo” to keep everything simple. The “Not Timlin Logo” will be marked as negative as images that fall in this category are the opposite of what we are looking for in the logo.
In order to have enough data for your workflow, the AI will require a minimum of 5 images per tag you create. What you want to do is give the AI between 5 and 10 images that either is or look like the Timlin Logo and 5-10 images that look nothing like it. An easy way to do something like this would be to take the logo and slice it into different quadrants (as shown below). Upload each of these spliced sections as separate images into the AI and assign them the “Timlin Logo” tag.
Spliced Images in Custom Vision AI
Next, we will want to feed it the Negative images. You can use any image that does not resemble the logo. In this example, I’ve used some stock Office logo images (as shown below).
Training Our Custom Vision Intelligence
Now that you have your sample data, we can start to Train our AI. To start this process, navigate to the “Train” button at the top left-hand corner.
You are then given two options: Fast Training and Advanced Training. What you are looking for is rather unique and easily identifiable, so you can simply use the “Fast Training” process.
If you were training an AI on hundreds or thousands of images to identify a very particular object/set of objects, you may look into using the Advanced Training process which will train the AI over a specified period of time. For now, select “Fast Training”, navigate to “Train” and wait for the training process to complete. If all went well, you should get your two tags with (most likely) a 100% precision rate in identifying whether an image is the logo or not.
You can test this with other images that aren’t in your sample pool as well. If you click on “Quick Test” you can feed the AI a separate image and ensure that the proper tag is being pulled back. For example, if I feed it the last screenshot referenced in this post, I should receive “Not Timlin Logo” back (as seen below).
Triggering Custom Vision Intelligence from Microsoft Flow
Triggering your Custom Vision AI from Flow and feeding it an image to test is very straight forward.
You can start by creating a new Instant Flow (one we can trigger manually). In this example, you will use a file stored in a library in our SharePoint tenant.
To do so, you first get the file content by using the “Get file content using path” function in Flow.
Now that you have access to the file and its content, you can add the action to determine the tags.
Search for and add the “Predict tags from image” action in Flow. You first need to configure the Custom Vision connection. Give the connection a name and your prediction key (found on the settings page of your Custom Vision application). Once that has been configured, the action itself will request your Project ID, which can be found from the Settings page of your Custom Vision AI project, the Image Content (which is the File Content stored in the last action) and you can also input an Iteration ID if no default is set.
To find the Iteration ID, you can access the “Performance” tab within Custom Vision AI, click on an iteration and copy the “Iteration id” value into the Flow Action.
The completed Flow action will look like the one below.
When run, the Flow should trigger the Custom Vision AI and give you a JSON output that you can use for any future conditions with probabilities assigned to them.
With this, you will have completed your first Custom Vision Intelligence setup with Microsoft Flow integration.
If you have any questions on the setup, or anything else related to Microsoft Flow, let us know. Our team of Microsoft experts is available to help you!
You may have noticed recently that your lists and libraries in SharePoint Online had changed from the Classic Experience to the Modern Experience. While Microsoft continues to push the use of the Modern Experience, these changes may become more frequent.
However, there are definitely some instances where you may want to remain on the Classic Experience for the time being, branding being one of the biggest reasons. Customization of any kind that was developed in Classic SharePoint using Content Editor Web Parts, Script Editor Web Parts, Master Page changes, etc. will not carry over into the modern sites.
The same applies to any sort of custom web parts that may have been developed for SharePoint. Any custom development that was not constructed using SharePoint Framework would not be supported or carry over easily.
So, here is a quick and easy way to use PnP PowerShell to revert all your lists and libraries back to Classic.
The Code to Revert Back to SharePoint Online Classic
The code we use is less than 40 lines and will return all the lists and libraries back to the way they were. The code does need to be run per site collection, as it will grab each subsite and their respective subsites under them and collect the lists and libraries to change back. If you are in an environment that tends to lean toward separate site collections for most aspects of your intranet, the script can be slightly modified to first grab all site collections (using and storing Get-PnPTenantSite in a variable while connected to your admin SharePoint center) and executing this same code in a loop through that variable. The code is as shown in the following screenshot.
The Process Behind the Code
The code shown will connect to your site collection via Connect-PnPOnline and the -UseWebLogin flag.
- First, while we are connected to the root web, we can grab all of its lists and store them in $rootLevelLists.
- Then, we loop through each list, check if it is already in Classic Experience and if not, use the Set-PnPList command to set it to “ClassicExperience”. You’ll notice we don’t have to use the -Web flag here as we are already in the context of where these lists live in the root.
- On line 3, we can gather all of the subsites under the root using Get-PnPSubWebs. The -Recurse flag will ensure we also get every subsite nested within a subsite.
- From there, we can iterate through each site, get and store all of the respective site’s lists in $subWebLists.
- We then iterate through each list, check if it is already in Classic Experience and if it is not, use the Set-PnPList command to set the List Experience to “ClassicExperience”.
The code could be refactored a bit and thrown into a function, but in this format it may be a bit easier to read. Depending on the amount of site collections, sites, lists, and libraries you have this could take 5-10+ minutes to run.
Once completed, all lists and libraries across your tenant should now be set to Classic Experience. Should you want to change this at any point in time, you can replace all of the “ClassicExperience” strings in the code to either “Auto” or “NewExperience” and re-run the script.
If you have any questions on this process or anything else related to SharePoint Online, let us know. We support literally everything SharePoint.
In most programming languages, we have access to an extremely helpful function called substring. We can use this function to extract snippets of a string that we need the most. Microsoft Flow is no different in the fact that it offers us the use of this function, but the way we use it is a bit different than typical modern approaches.
How Does Substring Work in Microsoft Flow?
This looks relatively standard, but the one part of this that might throw you off is the length parameter. In normal conditions, the length of the string would simply be exactly that, the length of the entire string you are trying to pull a substring out of. However, in this case, if we wanted to subtract a file extension from the name of a file, it would not work.
Let’s take MyWordDocument.docx as an example.
We want to extract “docx” from the string. Typically, we could use the string as the “text” parameter (which would be MyWordDocument.docx), start index would be the index in which the period is, and length would be the entire length of the string. If we do this, we will encounter an error saying that the length parameter we used cannot be longer than the length of the string itself.
There’s a reason this happens — the length is assumed from the starting index. If we had a starting index of 5 and the length of the string was 8, we would come out with a length of 13 instead of the original length of 8, resulting in the error.
How to Use Substring without Error
In order to remedy this problem, we need to do a couple of extra steps. Let’s initialize four parameters in our Microsoft Flow: FileExtension, IndexOfPeriod, LengthOfString, and NewLength as shown below.
First, we will get the index of the period in the string using the following expression:
We can store this in the “IndexOfPeriod” variable by using the “Set Variable” command in Flow. Next, we can store the entire length of the string in our “LengthOfString” variable using the following expression:
Now, in order to get the actual length, we are going to put into the substring function, we need to subtract the full length of the string from the index in which the period sits. We can store this in the “NewLength” variable and process this using the following expression:
Finally, we can use the substring function to store the final output (which should just be “docx”) in our “FileExtension” variable using the following expression:
With that, we should now see that the FileExtension variable now stores the output “docx”, which is exactly what we were looking for. Below is a screenshot of how the Set Variable commands look within Microsoft Flow.
If you have any questions about Microsoft Flow, please reach out to our team here!