OpsFusion.IdentitySync 9.0.0

dotnet add package OpsFusion.IdentitySync --version 9.0.0
                    
NuGet\Install-Package OpsFusion.IdentitySync -Version 9.0.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="OpsFusion.IdentitySync" Version="9.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpsFusion.IdentitySync" Version="9.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OpsFusion.IdentitySync" />
                    
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 OpsFusion.IdentitySync --version 9.0.0
                    
#r "nuget: OpsFusion.IdentitySync, 9.0.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 OpsFusion.IdentitySync@9.0.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=OpsFusion.IdentitySync&version=9.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OpsFusion.IdentitySync&version=9.0.0
                    
Install as a Cake Tool

OpsFusion.IdentitySync

Reusable identity permissions/screens sync package for ASP.NET Core APIs.

What this package gives you

  • Permission + screen sync orchestration
  • HTTP sync client to Identity Platform
  • File-based manifest reader
  • Background recycle sync hosted service
  • Startup force-sync helper
  • Reusable sync API endpoint: POST api/v1/identity-sync

1. Install package

If using project reference:

  • Reference OpsFusion.IdentitySync project/package in your API.

If using NuGet package:

dotnet add package OpsFusion.IdentitySync --version 9.0.0

2. Register services (one line)

In Program.cs:

using OpsFusion.IdentitySync;

builder.Services.AddControllers();
builder.Services.AddOpsFusionIdentitySync(builder.Configuration);

3. Add required authorization policy

The built-in controller uses policy: OpsFusion.IdentitySync.Execute.

You must define this policy in your auth setup. Example:

builder.Services.AddAuthorization(options =>
{
    options.AddPolicy("OpsFusion.IdentitySync.Execute", policy =>
        policy.RequireAuthenticatedUser()
              .RequireClaim("permission", "OpsFusion.IdentitySync.Execute"));
});

If your permission claim type is different, update RequireClaim(...) accordingly.

4. Required appsettings configuration

Add this section in your appsettings.json:

{
  "IdentitySync": {
    "Enabled": true,
    "BaseUrl": "https://your-identity-platform/",
    "PermissionsSyncPath": "api/v1/permissions/sync",
    "ScreensSyncPath": "api/v1/permissions/screens/sync",
    "PermissionsManifestPath": "Resources/opsfusion-permissions.json",
    "ScreensManifestPath": "Resources/opsfusion-screens.json",
    "RecycleIntervalMinutes": 60,
    "ForceSyncOnStartup": true,
    "FailStartupIfInitialSyncFails": false
  }
}

5. Manifest files

Ensure these files exist in your API output (copy to output/publish):

  • Resources/opsfusion-permissions.json
  • Resources/opsfusion-screens.json

FileIdentityManifestReader resolves paths from:

  1. absolute path (if provided)
  2. AppContext.BaseDirectory
  3. app content root

6. Trigger sync API

Endpoint exposed by package controller:

  • POST /api/v1/identity-sync

Requires authenticated user with permission policy OpsFusion.IdentitySync.Execute.

7. Optional startup force-sync

If you want initial sync on startup:

var app = builder.Build();
await app.ForceIdentityManifestSyncAsync();

Minimal integration checklist

  • Add package reference
  • Call AddOpsFusionIdentitySync(configuration)
  • Add policy OpsFusion.IdentitySync.Execute
  • Add IdentitySync config section
  • Ensure manifest JSON files exist

Notes

  • Default route is api/v1/identity-sync.
  • Default success response body:
{ "success": true, "message": "Permissions and screens synced successfully." }
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
9.0.0 93 5/2/2026