AAD Dynamic Group – example and formatting tips

If your company has at least an Azure AD premium P1 license, then you have access to a powerful feature - Dynamic group membership. Microsoft has a lot of information on how to construct those rules -  https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-membership So in my post I would rather focus on some formatting tips: When designing a rule, using a Windows PowerShell ISE or any coding software is helpful for proper spacing Use CRLF (carriage return line feed) to separate blocks in your dynamic rule - AAD system interprets those as spaces without any issues  If you keep formatting nice and tidy (rather than a blob of text), Graph API will preserve that formatting when pulling data for reports Use a combination of -in, -NotIn, and arrays as much as possible - this approach is great to further scale your rule Put OR condition to the very end of the rule A rule below…

Continue ReadingAAD Dynamic Group – example and formatting tips

SharePoint Column Formatting – use JSON to show column data in a pop-up window

Sometimes a SharePoint column has too much information, which eventually stretches rows and distorts the look. An example below is a Multiple lines of text type column: This simple JSON code is useful to hide noncrucial information, while still allowing easy access to that data by hovering your mouse cursor over it. { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "display": "=if(@currentField, '','none')", "font-size": "12px" }, "txtContent": "Hover to see more", "customCardProps": { "formatter": { "elmType": "div", "txtContent": "@currentField", "style": { "padding": "5px 5px 5px 5px", "border": "solid", "border-radius": "2px", "border-width": "1px", "box-shadow": "0 0 2px 0" } }, "openOnEvent": "hover", "directionalHint": "bottomCenter", "isBeakVisible": false } }

Continue ReadingSharePoint Column Formatting – use JSON to show column data in a pop-up window

Adaptive Cards – edit default approval Adaptive Card

This post will describe what steps to take to adjust a default Approval Adaptive Card. Why would one want to do that? Well, by default it shows some unnecessary information, Requested by First Last Name note is probably the most questionable.  In the example below a Power Automate Flow will be used to post a card into Microsoft Teams. Please note it's easy to break an Approval Adaptive Card when changing its JSON code. Let's create a Flow that creates an approval request, posts an Adaptive Card, and then waits for its result. Make the Flow run - what we really need is the output of it. Copy the code from the Message field as shown below. Go to https://adaptivecards.io/designer/ and paste the previously copied code into the Card Payload Editor. As soon as you change any element in your card using the visual editor, the code in the Card Payload…

Continue ReadingAdaptive Cards – edit default approval Adaptive Card

SharePoint Column Formatting – hide Title column and use JSON to show View and Edit buttons in any column

It’s not always convenient to use a default Title column that comes standard with a newly created SharePoint list. PowerApps form can take care of it and add some logic to it but it is still a Single line of text column. To make it even more complicated to remove, that Title column ties to a "view/edit an item" link. If you still want to get rid of it and not lose any functionality you can use a simple JSON code below: { "elmType": "a", "txtContent": "@currentField", "attributes": { "href": "='https://contoso.sharepoint.com/sites/dev/Lists/TestList/DispForm.aspx?ID='+[$ID]" }, "style": { "padding": "10px", "font-weight": "bold" } } However, this method has quite a few downsides: when closing a form, it redirects to a Default view (it is possible to specify which view to go but that might be a lot of hard-coding depending on how many views you have); the link is hard-coded; does not seem to open "modern…

Continue ReadingSharePoint Column Formatting – hide Title column and use JSON to show View and Edit buttons in any column

SharePoint – enable or disable Share option per each library within a site

This post is about how to enable or disable Share option for each library within a SharePoint subsite. There are different suggestions that worked for some but didn't for the others in this stackexchange topic - https://sharepoint.stackexchange.com/questions/208090/how-do-i-disable-get-a-link-share I found a way to control it by adjusting Access Requests Settings and Permission levels. Unfortunately it's almost impossible to find any documentation on what each Permission option does. Let's see how it all works together. Microsoft is known to change things down the road, so the settings that work today might not in the future. Please test everything before moving forward in your production environment. So here is a test subsite with two document libraries: The first requirement is Allow members to share the site and individual files and folders must be checked: Second, on your main site within a site collection you need to create a copy of the Contribute permission level, name it Contribute…

Continue ReadingSharePoint – enable or disable Share option per each library within a site

Skype for Business – using Banner logo from Azure-Company Branding in a Skype Logo URL

It's a good practice to display your Company logo in the places where it makes sense, e.g.: Login page (for users to be 100% sure they are trying to access their Company resource) Email signature (Company branding) Skype for Business meeting (Company branding) Configuring Logo in the Skype for Business is pretty straightforward and fully described in this Microsoft article - https://docs.microsoft.com/en-us/SkypeForBusiness/set-up-skype-for-business-online/customize-meeting-invitations Since it has to be a URL, it must be pointing to a web resource whether it's your Company website, SharePoint document library with enabled anonymous access or anything else. In my opinion, these are all unnecessary dependencies. Why not using something that is already configured? PREREQUISITES - Company Branding To configure Company branding you must follow these steps: Go to Microsoft 365 admin center - Admin centers - Azure Active Directory Then Azure Active Directory admin center - Azure Active Directory - Company branding - Banner logo Upload your Company logo image following the…

Continue ReadingSkype for Business – using Banner logo from Azure-Company Branding in a Skype Logo URL

SharePoint Document Library – show Path column in the view and make it clickable to open that path

How to add / show Path column in a view in a SharePoint Document Library appears to be a question with hundreds of different answers to it. The reasons for such a variety are: different versions of SharePoint (on premise, online, 2010, 2013); two Workflow variations ("old" workflow, Microsoft Flow); SharePoint Designer (2010, 2013); using Web Parts and more. Why would one need to see a Path column? Take a look at the two examples below; however, there might be more use cases. Example 1 - when searching for files. Example 2 - when using a view with "Show all items without folders" option selected Here is a test Document Library with a folder and some document in it: It's not possible to show Path column using out-of-the-box tools, the Path column is just not available to be selected: Although the Path can be seen if you open the details pane:…

Continue ReadingSharePoint Document Library – show Path column in the view and make it clickable to open that path

SharePoint Column Formatting – customize the look of Hyperlink columns and their Display Text

There is nothing wrong with how SharePoint Hyperlink columns display information by default. However, some users believe that the look is too generic, hard to bring attention to, which I myself tend to agree with. Let's see how it looks by default: The issues in my opinion are: the Display Text is grey and no different than any other column if Display Text needs to always be the same (e.g. CLICK HERE), then it has to be typed in that way in every single list item. We will address both issues. 1. KEEP THE ORIGINAL DISPLAY TEXT AND CHANGE THE LOOK The following JSON code is applied to both Hyperlink columns: { "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", "elmType": "a", "txtContent": "@currentField.desc", "style": { "color": "red", "font-weight": "bold" }, "attributes": { "target": "_blank", "href": "@currentField" } } 2. SHOW PREDEFINED DISPLAY TEXT AND CHANGE THE LOOK The following JSON code is applied to both…

Continue ReadingSharePoint Column Formatting – customize the look of Hyperlink columns and their Display Text

SharePoint Column Formatting – make choice type columns that represent boolean values visually stand out

If you have a SharePoint List that has a Choice type column with the following choices as an example: On / Off Active / Expired Yes / No True / False Enabled / Disabled (used in this example), then you might consider adding some column formatting that will help those different choices stand out. With Microsoft constantly simplifying Column Formatting it is possible now (as of 1/3/2019) to just select the color of the background depending on the choice. The editor is very limited though. See the screenshots below. All great, but let’s add our own formatting that in my opinion looks cleaner: To change formatting, click on Status column header – Column settings – Format this column. Once selected, there will be a Format column window on the right side. Paste the code from down below into that windows and save to get the result. The long version of…

Continue ReadingSharePoint Column Formatting – make choice type columns that represent boolean values visually stand out

SharePoint Column Formatting – show stars that match ratings from 1 to 5

Similar to what is done in the SharePoint Column Formatting – add different mood emojis that match ratings from 1 to 5 post, let's replace rating values with corresponding number of stars. Personally, I think it even looks better. Please note, the formatting doesn't adjust any data. If you export your data to Excel, you will still see numeric values. The icons are from https://developer.microsoft.com/en-us/fabric#/styles/icons To see how it works we will create a SharePoint list, then add a “Rating” column (Number type). For example purposes, five different ratings are added with scores from 1 to 5. To add matching number of stars to the “Rating” column, click on its header – Column settings – Format this column. Once selected, there will be a Format column window on the right side. Paste the code from down below into that windows and save to get the result. { "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", "elmType": "div", "children": [ { "elmType": "span", "attributes":…

Continue ReadingSharePoint Column Formatting – show stars that match ratings from 1 to 5