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 use the Azure AD associated with your SharePoint Online

Azure Active Directory (Azure AD)

With the usual configuration of Office 365 and Azure, there might be multiple Azure AD instances associated with your subscription. When creating registrations to whatever SharePoint-related apps that you might be using, if you create the registration to the wrong Azure AD, it can’t access the data in your SharePoint. Or at least without further configurations, it probably won’t get any data from your Office Graph API or whatever else you might want to use.  Continue reading

New version of Microsoft.IdentityModel.Clients.ActiveDirectory (ADAL.NET) is out – good time to update!

Mock Function call to force loading an assembly - how elegant!

 There’s now a new version of the assembly Microsoft.IdentityModel.Clients.ActiveDirectory available – plenty of reasons to update right away! Let me offer you one hot take on the matter.

Why bother updating?

In an earlier post I described an issue I had with Microsoft.IdentityModel.Clients.ActiveDirectory.Platform not getting copied during the build in a referencing project. In 3.17.0, which came out this month, the issue is fixed! The new package actually contains separate DLLs for different platforms.

In essence this means, that from C#/.NET -developer’s standing point, the team has assimilated the Microsoft.IdentityModel.Clients.ActiveDirectory.Platform assembly, among other platform DLLs, into Microsoft.IdentityModel.Clients.ActiveDirectory package itself. Hence, you’ll need no more funky hacks to ensure the DLLs get copied! 🙂

What’s new with Microsoft.IdentityModel.Clients.ActiveDirectory 3.17?

Continue reading

A quick but unknown hack to force referenced assembly to getting copied to a project

Mock Function call to force loading an assembly - how elegant!

Referenced assembly not getting copied to a project in build might lead to surprising runtime errors. This post will explain one method of fixing these issues.

Problem

After build, you might get this kind of error:

In my case, I had referenced both of these DLLs in my “class library project”, which provided my console program a lot of functionality:

  • Microsoft.IdentityModel.Clients.ActiveDirectory.Platform
  • Microsoft.IdentityModel.Clients.ActiveDirectory

Continue reading

The effect of using Managed Navigation instead of Structural on SharePoint Online

SharePoint_aint_broken

 Have you ever noticed that your SharePoint site just gets slower and slower? That’s probably because the performance of Structural Navigation is absolutely horrible, especially vs. Managed Navigation. This blog post includes our findings about the issue, and I also include some explanation of the reasons behind the difference and a simple comparison to Search-based navigation.

Continue reading

Solving Microsoft Teams Licensing Error “errorCodeTeamsDisabledForTenantForbidden”

Launching Microsoft Teams

This post explains how to fix the “errorCodeTeamsDisabledForTenantForbidden” error when trying to add guest users to Microsoft Teams channel. This issue might arise when a user is invited to a channel in your organization’s Microsoft Teams for the first time. Fixing it usually just requires a flip of a switch, but might also include some waiting.

Symptoms

You get an error screen like this, when trying to join a Teams channel as a guest user.

Teams Guest access error

Teams Guest access error

No fear, though – likely an easy fix!

Continue reading

SharePoint-Teams -integration using a tab

Microsoft Teams Logo

This post describes one possible scenario for SharePoint-Teams -integration, how to achieve that, and what kind of issues there might be.

Teams? What’s that?

At Blue Meteorite, we at the Valo team have been leveraging Teams since early 2017 as our main communications channel. For us, it complements Yammer, email and Skype for Business quite nicely, although to be fair, it’s not always 100% clear which channel would be optimal for a certain piece of communication… 🙂

The Redmond Magazine calls Teams Microsoft’s response to Slack, and for someone who has used both, the source of inspiration is rather obvious. Built for “high-velocity teams”, it’s yet another collaboration/communication tool, but in a way more flexible than either Skype for Business or Yammer. First and foremost I’d position it as a challenger to services like Slack – and hence at least partially a new addition to Microsoft’s ecosystem.

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