4 ways to fix error AADSTS65001 (The user or administrator has not consented to use the application)

Azure AD Login error

Fixing issues with Azure AD authentication for Enterprise applications can be tricky. This article contains multiple different fixes to an issue, where granting admin consent has somehow failed. Not all of the different solutions will work for all situations, though! That’s why I included a couple of different options to try… 🙂

Why do you even get issues with Admin Consent (like AADSTS65001)?

You’re trying to add or use an app, that requires such permissions from your tenant, that can only be granted by an administrator. Typically this app has to be added by a global administrator. If it’s an enterprise application, it could also be in an invalid state after someone tried adding the app without sufficient permissions.

Our investigation was focused on a mobile app, that’s deployed as an enterprise app. Most of the things should apply for web-based apps or console programs or whatever else you’re deploying, too.

The whole error might look something like this: Continue reading

How to solve errors about missing PnP Cmdlets on PowerShell

SharePoint PnP logo

This blog posts briefly describes how to solve some of the most typical errors about missing PnP Cmdlets when using Windows Powershell (or SharePoint Online Management Shell).

Symptoms

When trying to run some PnP-related cmdlet, you get an error similar to ones below:

Usually, this is luckily a simple fix!  Continue reading

Fixing the “For security reasons DTD is prohibited in this XML document.” issue

"For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method."

This post describes a couple of ways to fix the issue “For security reasons DTD is prohibited in this XML document”. At least for me, it appeared when trying to access SharePoint Online using Powershell or a console program using OfficeDev.PnP (which in turn uses CSOM).

Error

When running any piece of code, whether in PowerShell, .exe console or anything else than in the code behind relies on .NET Framework, you get an error like this:

Continue reading

Unorthodox configuration: How to use VLK and Click-to-run Office Apps side-by-side (Visio and Office 2016 as an example)

Ever had issues with different versions of Office programs not living in harmony together? Me too! This post describes how I was able to fix the issue and get Visio and Office 2016 of different installation types to play well together.

Preface

This blog post was inspired by my need to have Office 365 ProPlus (2016 versions) and Visio running side-by-side on my laptop. That turned out to be a lot more complicated than it arguably should be, so I documented the steps for further use. These instructions are written for that particular scenario (installing MS Visio on a machine with pre-existing Office 2016/365 ProPlus installation). My laptop is running Windows 10 Enterprise, which probably caused one of the issues I ran into.

Let’s get started!  Continue reading

Using SharePoint Search Query Tool

SharePoint Search Query Tool

If you’re working on SharePoint deployments, and aren’t familiar with SharePoint Search Query Tool, you’re probably doing something wrong. Or you’ve gotten a really troublefree tenant and simple requirements.. 🙂 At least for technical issues, it’s the #1 tool for debugging what’s in the index and what isn’t. This blog post describes how to use it to investigate SharePoint Online Search index issues.

This blog post is about using SharePoint Search Query Tool to investigate search index issues in SharePoint Online. First of all, you can get the tool from here: https://sp2013searchtool.codeplex.com/.

Continue reading

Fixing the “Could not load file or assembly … or one of its dependencies” error

Visual Studio logo

This post describes how to fix the “Could not load file or assembly ‘<assemblyname>’ or one of its dependencies. An attempt was made to load a program with an incorrect format.” error. 

Problem

Especially while installing a new dev machine, and building your project for the first time, you may end up getting the following exception:

No fear, though, as this is usually easily fixed. In quite a few cases, it’s simply a mismatch between architectures and easily changed.

Continue reading

Fixing Lenovo T460S Wifi connectivity issues (removing the evil versions of Intel Dual Bank Wireless-AC 8260 driver)

I recently received a new work laptop – Lenovo T460S. A cute little thing with impressive performance and reasonably good battery life. However, what people frequently complaing about online in regards of this laptop, is its absolutely, horribly awful wifi. This, in turn, is probably caused by it’s bad wifi chip, Intel Dual Bank Wireless-AC 8260. And they’re right – it’s a load of crap.

Continue reading

Getting Connect-MsolService (and other SharePoint Online cmdlets) to work

Connect-MsolService

In this post, I’ll try to archive everything you need to download and install to get commandlets like Connect-MsolService working. I’ve had to do it a couple of times when changing laptops, so it’s good to document them somewhere 🙂

Required installations:

  1. Microsoft Online Services Sign-In Assistant for IT Professionals RTW
    1. https://www.microsoft.com/en-us/download/details.aspx?id=28177
  2. SharePoint Online Management Shell
    1. https://www.microsoft.com/en-us/download/details.aspx?id=35588
  3. Windows Azure Active Directory Module for Windows PowerShell (v1)
    1. http://connect.microsoft.com/site1164/Downloads/DownloadDetails.aspx?DownloadID=59185

Now, to run cmdlets like “Connect-MsolService”, just start SharePoint Online Management Shell (or PowerShell).

If you also need Azure Remote Management (AzureRM) cmdlets, run this in an elevated PowerShell:

Continue reading

Remove-SPODeletedSite – Actually removing a SharePoint Online Site Collection

Delete site collection

This post describes the actual, working and fast process of removing a site collection in SharePoint Online using the Remove-SPODeletedSite commandlet in SharePoint Online Management Shell (a flavor of PowerShell).

Description

Sometimes you need to get rid of a site collection you’ve created in SharePoint Online. The most typical example perhap being removing the team site created for a group of people working together. That’s pretty simple and there are a few ways of doing that – namely, deleting the site from Site Settings or removing the site collection from SharePoint Administration. However, sometimes you need to recreate a new site using the same url as the one you removed – and that’s not going to be possible.

"Delete this site" on SharePoint Online

“Delete this site” on SharePoint Online

Delete site collection

Delete site collection on SharePoint Administration

Why is that, you ask?

Well, after you remove the site collection, it actually goes to the recycle bin. The bad thing is, that this recycle bin is NOT accessible using web browser, but only by PowerShell. SharePoint Online still reservers that url for the site, though, so you can’t create a new one with the same url!

Continue reading

Fixing error “No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient'”

No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

This post describes the fix to error “No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient'”, which Visual Studio throws at your face when you try to run an application on any Windows-based system (or which you’ve dug out of event logs). Also, you’re probably using Entity Framework in your project.

Error

When debugging/running your code you get an error like this:

The running of the program is stopped there, and removing and readding the nuget packages and/or other references to dlls does not help. I tried also making all kinds of changes to my web.config, but nothing seemed to help. There’s a simple fix available, though!

Continue reading