https://github.com/intility/authorization-azure-guestpolicies
https://github.com/intility/authorization-azure-guestpolicies
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/intility/authorization-azure-guestpolicies
- Owner: intility
- License: mit
- Created: 2023-11-15T15:14:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T07:39:54.000Z (over 1 year ago)
- Last Synced: 2025-03-27T13:01:52.277Z (about 1 year ago)
- Language: C#
- Size: 36.1 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Intility.Authorization.Azure.GuestPolicies
Deny guests users in the authorization flow.
[](https://github.com/Intility/Authorization-Azure-GuestPolicies/actions/workflows/build_and_test.yaml)
[](https://github.com/Intility/Authorization-Azure-GuestPolicies/actions/workflows/publish.yaml)


Install the _Intility.Authorization.Azure.GuestPolicies_ [NuGet package](https://www.nuget.org/packages/Intility.Authorization.Azure.GuestPolicies/)
```powershell
Install-Package Intility.Authorization.Azure.GuestPolicies
```
Then, add the policy to the `AuthorizationPolicyBuilder`:
```csharp
builder.Services.AddDenyGuestsAuthorization();
builder.Services.AddAuthorization(options =>
{
options.DefaultPolicy = new AuthorizationPolicyBuilder()
.DenyGuests()
.Build();
});
```