# Build Microsoft Entra Authentication Event Functions

Custom authentication extensions require precise event contracts and response actions. This skill provides focused .NET patterns for Azure Functions and Microsoft Entra events.

## Install

```bash
npx skillstore add sickn33/microsoft-azure-webjobs-extensions-authentication-events-dotnet
```

## Metadata

- Status: approved
- Slug: sickn33-microsoft-azure-webjobs-extensions-authentication-events-dotnet
- Skillstore revision: r2
- Version status: missing
- Tree hash: f20e8b2250764328055a6e0d30d4fc50049faa7e7570639851488e3b2899e36f
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/microsoft-azure-webjobs-extensions-authentication-events-dotnet
- Ref: 81e05e636292629114b76cbb3922fbe57672fc02
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-microsoft-azure-webjobs-extensions-authentication-events-dotnet
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-microsoft-azure-webjobs-extensions-authentication-events-dotnet/manifest

## Capabilities

- Creates token issuance handlers that add custom claims to Microsoft Entra tokens.
- Shows attribute collection start handlers with default, prefill, and blocking responses.
- Builds attribute submission validation and value modification workflows.
- Outlines custom OTP delivery handlers with success and failure responses.
- Provides Function App configuration, Entra registration steps, and SDK type references.

## Use Cases

- Enrich issued tokens: Design a token issuance function that retrieves trusted profile data and returns approved custom claims.
- Validate sign-up attributes: Create attribute collection handlers that prefill values, reject invalid submissions, and normalize accepted data.
- Plan custom OTP delivery: Structure an OTP event handler for an approved SMS, email, or push provider.

## Prompt Templates

### Create a token claims handler

```
Create a .NET Azure Function for OnTokenIssuanceStart. Add department and cost center claims from trusted input. Include validation and error handling.
```

### Validate sign-up attributes

```
Build an OnAttributeCollectionSubmit handler. Validate email and display name, return field errors, and normalize accepted values.
```

### Integrate an external profile service

```
Design token enrichment using an external profile API. Include authentication, timeouts, caching, response validation, fallback behavior, and privacy-safe logging.
```

### Review a production authentication extension

```
Review my Entra authentication event design for security, latency, failure behavior, permissions, claims integrity, observability, and deployment readiness.
```

## Limitations

- Provides guidance and examples but does not deploy or configure Azure resources automatically.
- Uses placeholder external API and SMS integrations that require production implementations.
- Does not replace tenant-specific permission, security, timeout, or compliance testing.
- Focuses on the Azure WebJobs Authentication Events extension and not every Microsoft identity SDK.

## Best Practices

- Validate event payloads and external data before adding claims or modifying user attributes.
- Use managed identities, narrow permissions, strict timeouts, and explicit fallback behavior for dependencies.
- Log correlation identifiers while excluding OTP values, tokens, phone numbers, and unnecessary personal data.

## Anti Patterns

- Do not trust external profile fields or place unrestricted data into token claims.
- Do not throw unhandled exceptions that can interrupt the authentication flow.
- Do not place secrets, OTP values, access tokens, or personal identifiers in logs.

## Security Audit

- Audited at: 2026-08-04T14:10:17.885\+00:00
- Summary: All 54 static findings are false positives caused by Markdown formatting, illustrative code, reserved example URLs, official reference links, or ordinary guidance. No executable automation, prompt injection, data exfiltration intent, or malicious system reconnaissance was found.

## Stats

- Views: 99
- Downloads: 11
- Favorites: 0
- Popularity score: 0
