Tharga.Team.Entra 3.9.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tharga.Team.Entra --version 3.9.0
                    
NuGet\Install-Package Tharga.Team.Entra -Version 3.9.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tharga.Team.Entra" Version="3.9.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tharga.Team.Entra" Version="3.9.0" />
                    
Directory.Packages.props
<PackageReference Include="Tharga.Team.Entra" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tharga.Team.Entra --version 3.9.0
                    
#r "nuget: Tharga.Team.Entra, 3.9.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tharga.Team.Entra@3.9.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tharga.Team.Entra&version=3.9.0
                    
Install as a Cake Addin
#tool nuget:?package=Tharga.Team.Entra&version=3.9.0
                    
Install as a Cake Tool

Tharga.Team.Entra

Microsoft Entra ID user-directory provider for Tharga Team. Implements IUserDirectoryService over Microsoft Graph so the platform can:

  • Verify that a local user still exists (and is enabled) in Entra — resolved by the stored directory object id, falling back to email/UPN lookup (which also relinks the user).
  • List directory-only users — users that exist in Entra but not in the platform.
  • Delete a user from Entra (opt-in, from the user-delete flow). Graph performs a soft delete: the user is restorable by an administrator for 30 days, but is removed org-wide immediately.

Registration

builder.Services.AddThargaEntraUserDirectory(builder.Configuration);

Configuration is read from the AzureAd section (TenantId, ClientId, ClientSecret) — the same section the Tharga platform sign-in already uses. Override or supply values in code:

builder.Services.AddThargaEntraUserDirectory(builder.Configuration, o =>
{
    o.ClientSecret = builder.Configuration["Entra:ClientSecret"];
    // or plug any Azure.Core TokenCredential (e.g. managed identity):
    // o.Credential = new ManagedIdentityCredential();
});

Incomplete configuration hides the directory

Without complete credentials — no TenantId, ClientId or ClientSecret, and no explicit Credential — the directory reports IsConfigured == false, and every directory feature (verify actions, the Directory column, the directory-only tab, the delete-from-directory opt-in) stays hidden exactly as if nothing were registered. Offering a Verify button that throws on click is worse than not offering it.

Calling the service directly still throws InvalidOperationException naming the three settings, so a host bypassing the UI gets a diagnosis rather than a silent failure.

Absent and half-set are treated differently, because only one of them is a mistake:

Configuration Directory features Log
No credential field set at all hidden silent — reads as a deliberate opt-out
Some set, some missing hidden Warning naming exactly which values are missing
A Credential supplied available silent
All three set available silent

Registering the directory in every environment and supplying secrets in only some is a normal shape, so that stays quiet. Half-filling a credential is not something anyone does on purpose, and the symptom — directory features quietly absent — gives no clue where to look, so it warns once at startup.

Azure AD B2C has no TenantId key. The tenant is embedded in Authority, so binding the AzureAd section leaves TenantId null and the directory unusable. Set it explicitly in the configure callback.

Writing a display name back

IUserDirectoryService.SetUserNameAsync writes displayName via Graph PATCH /users/{id}. It needs no permission beyond the User.ReadWrite.All that deletion already requires.

Off by default. Set o.Blazor.WriteNameToDirectory = true to have an administrative rename push the name to the directory as well. Self-service renaming is never pushed, whatever the option says.

The local write always happens first and is never rolled back — a directory failure is reported on UserNameChangeResult.DirectoryError. Coupling them would let a Graph outage block renaming a user in the application.

The driver: an application that collects no attributes at sign-up holds the real name while the directory holds a placeholder such as "unknown", so the good name exists and cannot reach anyone administering the tenant. A host federating from a corporate directory wants the opposite, which is why this is opt-in.

Entra app-registration permissions

Grant the app registration application (app-only) Graph permissions, with admin consent:

Feature Permission
Verify users, list directory-only users User.Read.All
Delete users from Entra User.ReadWrite.All

Deleting also requires the app's service principal to hold a directory role allowed to delete users (e.g. User Administrator) when the target is an administrator-role holder.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.13.1 0 8/18/2026
3.13.0 53 8/17/2026
3.12.0 93 8/10/2026
3.10.9 89 8/9/2026
3.10.8 101 8/9/2026
3.10.7 86 8/7/2026
3.10.6 96 8/7/2026
3.10.5 99 8/4/2026
3.10.4 94 8/3/2026
3.10.3 99 8/2/2026
3.10.2 101 8/2/2026
3.10.1 97 8/2/2026
3.10.0 99 8/1/2026
3.9.0 96 8/1/2026
3.8.3 102 8/1/2026
3.8.2 99 8/1/2026
3.8.1 105 7/31/2026
3.8.0 94 7/31/2026
3.7.0 124 7/30/2026
3.6.1 95 7/27/2026
Loading failed