Power BI – Error – Contact your admin to enable embed code creation

Microsoft Power BI When a user tries to create new embed codes using the “Publish to Web” feature, he/she/them will get the error “Contact your admin to enable embed code creation”.

Cause of the error

The reason behind this issue is, Microsoft changed the default state of “Publish to web” setting in tenant admin settings. Previously it used to be “Allow existing and new codes” and now it’s “Only allow existing codes”

The fix

The fix is simple, just change the settings to “Allow existing and new codes” and users should be able to publish to web.

The security issue & fix

But wait still the security issue exists. Any user can publish to the web and the report data is exposed to any user on the Internet who has access to the report URL. So the best course of action is to enable the additional security settings, which is “Apply to” “Specific security groups”. Once enabled, only users from a specific security group will be able to create embed codes using “Publish to web”.

For more documentation on the settings, please visit Microsoft Docs

Microsoft 365 plan comparison

One of the necessity of being a Microsoft 365 based architect is knowing the difference between various licenses or plans.

Though Microsoft provides a good deal of information including plan comparisons, it’s not as easy to understand as we think especially when multiple products are involved.

Following is a link which I came across and seems to be a good one to understand what is included and what is not under one single location.

https://www.infusedinnovations.com/blog/secure-modern-workplace/complete-office-365-and-microsoft-365-licensing-comparison

Finding OneDrive for Business space usage using PowerShell

Microsoft OneDrive for Business Logo One of the SharePoint Online administrator of the customer I work with wanted to know the space used by a business user’s private OneDrive.

The following PowerShell script helps to know the exact same information.

The script assumes that you have the SharePoint administrator role in your tenant.

To run this script “SharePoint Online Management Shell” PowerShell module should have been installed

Make sure you update the variables $tenantName & $url

Please note that the below scripts use minimal error handling for simplicity and clean code.

Script for single URL

Clear-Host
 
$tenantName = "tenant name"
$url = "https://unit4-my.sharepoint.com/personal/<user one drive url>"
 
Connect-SPOService -Url "https://$tenantName-admin.sharepoint.com"
 
$sc = Get-SPOSite $url -Detailed -ErrorAction SilentlyContinue | Select-Object url, storageusagecurrent, Owner 
$usage = [math]::round(($sc.StorageUsageCurrent/1024),2)
$owner = $sc.Owner
 
Write-Host "Site: $url"
Write-Host "Owner: $owner"
Write-Host "Usage: $usage GB"
 
Disconnect-SPOService

The following script helps to do the same for multiple URLs. All you need is a text file with OneDrive URL per line and it will provide output in a csv file.

Script for multiple URLs

$inputFileName = "OneDrive-Usage-URLs.txt"
$outputFileName = "OneDrive-Usage-URLs.csv"

Clear-Host
$tenantName = "tenant name"

Connect-SPOService -Url "https://$tenantName-admin.sharepoint.com"
$inputFile = Get-Content -Path .\$inputFileName
Add-Content .\$outputFileName -Value "URL,Owner,Usage (GB)"

foreach ($url in $inputFile) {
    $sc = Get-SPOSite $url -Detailed -ErrorAction SilentlyContinue | Select-Object url, storageusagecurrent, Owner
    $usage = [math]::round(($sc.StorageUsageCurrent / 1024), 2)
    $owner = $sc.Owner
    Add-Content .\$outputFileName -Value "$url,$owner,$usage"
    Write-Host "Site: $url"
    Write-Host "Owner: $owner"
    Write-Host "Usage: $usage GB"
    Write-Host ""
}

Disconnect-SPOService

Input file format (OneDrive-Usage-URLs.txt)

https://tenant-my.sharepoint.com/personal/user1_tenant_com
https://tenant-my.sharepoint.com/personal/user2_tenant_com

Output file format (OneDrive-Usage-URLs.csv)

URL,Owner,Usage (GB)
https://tenant-my.sharepoint.com/personal/user1_tenant_com,user1@tenant.com,123.45
https://unit4-my.sharepoint.com/personal/user2_tenant_com,user2@tenant.com,678.90

Change SharePoint Wiki Page Title

Microsoft SharePoint Logo At the time of writing this article, Microsoft has already rolled out the modern experience to all the lists and libraries.

In the old classic sites, there was a possibility to change the the title of Wiki pages and now that is almost gone, but still there is a way to change the title.

Follow the steps below to change the wiki page title.

  1. In the SitePages/Pages switch to “Return to classic SharePoint” at the bottom left.
  2. Edit the views of “By Author” or “All Pages”.
    1. Add the column “Title”.
    2. Save the changes to the view.
  3. Go back to the view.
  4. Click on the ribbon and expand tab “Library”.
  5. Click on the “Quick Edit”.
  6. Make the changes to the respective page’s title column.
  7. Exit “Quick Edit” to save the changes.

Do please note that for now this works but not sure how long Microsoft will keep this option open.

Enabling SharePoint App catalogue at site collection level in SharePoint Online

Microsoft SharePoint Logo Sometimes we require to deploy SharePoint apps to a development site collection instead of tenant app catalogue. During those scenarios the following PowerShell command can be used to enable the app catalogue at site collection level.

Please note that you will require SharePoint Online Management Shell for this PowerShell to work. Please refer here for installation.

Enabling site collection app catalogue

Connect-SPOService -Url https://yourtenant-admin.sharepoint.com

# Reference of the site collection where the site collection app catalogue should reside
$site = Get-SPOSite https://yourtenant.sharepoint.com/sites/yoursitecollection
 
# Create app catalogue in the site collection
Add-SPOSiteCollectionAppCatalog -Site $site

Disabling site collection app catalogue

Connect-SPOService -Url https://yourtenant-admin.sharepoint.com

# Reference of the site collection where the site collection app catalogue should reside
$site = Get-SPOSite https://yourtenant.sharepoint.com/sites/yoursitecollection
 
# Remove app catalogue from the site collection
Remove-SPOSiteCollectionAppCatalog -Site $site 

Remove the title banner from SharePoint modern page

Microsoft SharePoint Logo The title banner in the modern pages of SharePoint takes a lot of space.

Even if you try to switch to “Plain” title layout, the title area still will take some space.

To completely remove the space, you can run the following PnP PowerShell command with the ID of the page.

For more about PnP PowerShell, visit this link.

Set-PnPListItem -List SitePages –Identity <id> -Values @{"PageLayoutType"="Home"}

First connect to the site using the following command

Connect-PnPOnline https://tenant.sharepoint.com/sites/site-where-the-page-exists  

Then find out the ID of the page using the following command. This command assumes that the page is located within “SitePage” library.

Get-PnPListItem -List SitePages

Finally set the page’s layout type to “Home” by running the following command.

Set-PnPListItem -List SitePages –Identity <id> -Values @{"PageLayoutType"="Home"}

Now the title area is totally gone.

Logon attempt failed for remote desktop Windows 10

Microsoft Windows 10 Logo

Scenario

  • My remote PC is a Windows 10 Pro v1809.
  • The remote PC Windows user is an Office 365 user.
  • I’m trying to login to my remote PC and I get the error “Logon attempt failed”.
  • The following are the various user IDs I tried and none of them worked.
    • user@domain.com
    • AzureAD\user@domain.com
    • AzureAD\user
The logon attempt failed

Solution

  1. Save an RDP connection as file with parameters like name of the PC.
  2. Open the RDP file using a text editor like notepad.
  3. Modify the entry “authentication level” to “authentication level:i:0”
    1. Make sure the “Allow connections only from computers running Remote Desktop with Network Level Authentication” is unchecked in the remote machine’s settings.
  4. Add the entry “enablecredsspsupport:i:0”.
  5. Now save the file.
  6. Run the RDP file and it should connect to remote machine and show you the login screen of the remote machine
  7. Type in the username as AzureAD\user@domain.com
  8. Password as login password and not the Windows PIN.
  9. Now you should be able to login.

Refer here for more information.

Dead man’s switch in digital world?

According to Wikipedia, a dead man’s switch is a switch that is designed to be activated if the human operator becomes incapacitated, such as through death, loss of consciousness, or being bodily removed from control.

Why am I talking about this?

Well, today I came across this news about a Canadian cryptocurrency firm CEO Gerald Cotten who dies in India taking with him the password of the cryptocurrency vault containing $190,000,000 of his investors money to his grave. Unfortunately neither his wife nor security firm had any luck in retrieving the vault contents as on the date this article was written.

Similarly, one of my colleague who’s dad (wife died before him) died due to natural causes, forgot to inform his son that he has around ₹11,00,000 in his bank account. My friend, the son came to know about this while trying to close his dad’s bank account and faced lot of difficulty to close the account. As far as I know he couldn’t retrieve the money nor close the account since his dad didn’t nominate him. The proofs provided where not accepted by the bank. I didn’t know if he succeeded later.

Few years back I went to a foreign country and fell sick, fortunately it was a minor health issue but during the issue I had this thought to make sure I have to inform someone about my details.

Why is this important?

These days most of the governmental documents, bank accounts and other relevant critical information are digitalized. Most of the digitalized content don’t have an alternative nominee who can take over, except for the financial records where by Indian law it’s a must to add a nominee. Also, these digital content are secured using credentials and multi-factor authentications.

So in the eventuality of our death or medical conditions like coma, we have to make sure our spouse or parents or siblings or friend for life should have access to our contents. Google, Microsoft & Facebook have various policies which allow access. Yahoo specifically requires professional legal personnel to approve it by court order. All the providers mentioned, require offline and physical proofs along with legal court orders.

What can you or I do?

Following are few steps we can take.

  1. Authorization letter.
    1. Write an authorization letter having information like who (nominee) has the right to your physical and digital assets along with the list of those assets.
    2. Sign it physically with a date.
    3. Scan it and keep it in a secured digital as well as physical location.
    4. Use automated services like Dead Man’s Switch (https://www.deadmansswitch.net/) to send out a mail to the nominee if in case you don’t respond to the reminders from service to prolong the dead man’s switch.
  2. E-Mail accounts
    1. Use relevant features in your email accounts to send out access to your data.
    2. Save a copy of alternate access codes of the multi-factor authentication along with the above authorization letter in digital location only.
  3. Password Management accounts
    1. Store all your credentials in a renowned password management services.
    2. User emergency access or similar features to provide access to your account.
    3. If required keep a scanned copy of the password in plain text along with above authorization letter in digital location only. Take care to make sure the font you use can show difference between alphabets and numbers.
    4. Make sure all your accounts have multi-factor authentication enabled.
    5. (Password management service can to an extent overcome hurdles in accessing contents instead of dealing with providers to gain access. Keep in mind, still it might be illegal to use the data without the help of professional legal personnel.)
  4. Phone numbers
    1. Share your critical phone numbers which will be used to intimate the access codes to your family and friend for life.
    2. Do make sure the mobile plan is always active.

In addition you can do the following

  1. Employee details
    1. Share your employee and few other details to your family and friends all the time.
    2. Share your organization/company emergency contact details to your family and friends all the time.
  2. Medical information
    1. Keep a log of your medical details and share it with your family and friend for life.

Dying should be a natural process, but due to environmental, financial and work factors, our health might take a turn for the worse and we should be prepared to lessen the burden for our loved ones.

Sharepoint Online’s modern experience web parts and their quivalent classic experience web parts

SharePoint 2013 Logo

SharePoint’s modern experience web parts is an easy and fast way to bring content to the viewer. But at the same time it’s not as configurable or as exhaustive as it is when compared to classic experience web parts.

The following URL shows some of the modern web part equivalents of classic web parts. Please note that these are not a 1:1 matching, instead they have similar functionalities.

Click here to visit “Classic and modern web part experiences” by Microsoft