Skip to content

A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.

6.9 KB
Raw Blame

IDP App Setup Reference

How to set up an OIDC identity-provider app registration for Power Pages — the provider-agnostic contract plus links to each provider's official docs.

Scope — app-registration settings only. This reference covers just the IDP app-registration side: the Power Pages ↔ IDP contract and the app site settings it yields (ClientId, Authority, MetadataAddress, AuthenticationType, RedirectUri, plus an optional ClientSecret only when the user opts into a confidential client). The other auth site settings the skill writes — login-button Caption, claims mapping (RegistrationClaimsMapping / LoginClaimsMapping), and registration gating (OpenRegistrationEnabled) — are not app-registration settings; they live in the skill's Phase 8.1 and authentication-reference.md.

How the app is set up depends entirely on the provider, so always read the provider's current documentation first to learn the configuration steps and any CLI it offers for automating them (Okta, Auth0, and Entra External ID each provide one — see Per-IDP setup docs). The setup-auth skill's Phase 2.1.2 drives the actual setup; this reference is the provider-agnostic contract it applies.

Contents

The Power Pages ↔ IDP contract

Power Pages redirects the user to the IDP, receives the response at the Redirect URI, validates the token, then maps the identity to a Dataverse contact. Regardless of provider, the app registration must satisfy this contract:

  • Redirect URI = {SITE_URL}/signin-{ProviderName-lowercased} — lowercase the provider slug in this path; the resulting URI must then be referenced exactly as registered at the IDP (the signin- prefix and the full string must match character-for-character).
  • ID token issuance enabled — Power Pages' default response type is code id_token, so the app must return an ID token from the authorize endpoint.
  • Web application; client secret optional — code id_token needs none by default. See below.
  • Scopes openid profile email — so the token carries the claims Power Pages maps to the contact.

Everything Power Pages needs downstream (Authority, MetadataAddress, ClientId) is derived from these — see Resulting site settings.

Client secret: code id_token is the default

Power Pages' default OIDC response type is code id_token: the ID token returns on the front channel, so the app is a Web application that needs no client secret.

Default to code id_token; configure a client secret only when the user prefers a confidential client.

Per-IDP setup docs

Ground each step in the provider's current docs before acting. Mirror the fully worked example in authentication-reference.md → "Entra External ID — Tenant and App Registration Prerequisites". For every provider: register an OIDC app as a Web application (code id_token, no client secret by default), set the Redirect URI, enable ID-token issuance, and request openid profile email.

Okta

  • Create an OIDC app / authorization code flow: https://developer.okta.com/docs/guides/implement-grant-type/authcode/main/
  • Customize tokens (claims): https://developer.okta.com/docs/guides/customize-tokens-returned-from-okta/main/
  • Okta CLI (create OIDC apps): https://cli.okta.com/
  • Enable Authorization Code + Implicit (Hybrid) grant with Allow ID Token (required for code id_token) and assign the app to users (Assignments → Assign to Everyone or specific users). A missing grant or assignment fails sign-in with access_denied "Policy evaluation failed".
  • Authority: prefer the Org authorization server https://{yourOktaDomain} — no access policies, so it avoids that error and covers openid profile email. Use https://{yourOktaDomain}/oauth2/default only when you need groups/custom claims, and then also allow Authorization Code + Implicit (Hybrid) in that server's Access Policy rule. MetadataAddress: {authority}/.well-known/openid-configuration.

Auth0

Microsoft Entra External ID

Other OIDC providers

Follow the provider's OIDC app-registration docs. Authority = the provider's issuer; MetadataAddress = {authority}/.well-known/openid-configuration (read the endpoints and claims_supported from it). OIDC spec: https://openid.net/specs/openid-connect-core-1_0.html.

Resulting site settings

However the app was created, Phase 8.1 writes these app-registration OIDC site settings (via ${PLUGIN_ROOT}/scripts/create-site-setting.js):

Setting Source
Authentication/OpenIdConnect/{ProviderName}/Authority provider Authority (see per-IDP format above)
Authentication/OpenIdConnect/{ProviderName}/MetadataAddress the provider's OIDC metadata (discovery) endpoint — read from the IDP (commonly {authority}/.well-known/openid-configuration, but not for every provider)
Authentication/OpenIdConnect/{ProviderName}/ClientId the app's client/application ID
Authentication/OpenIdConnect/{ProviderName}/AuthenticationType same as Authority (must match exactly)
Authentication/OpenIdConnect/{ProviderName}/RedirectUri {SITE_URL}/signin-{ProviderName-lowercased}

Getting the MetadataAddress: fetch {authority}/.well-known/openid-configuration — if it returns OIDC metadata JSON, that's the value. Otherwise use the discovery URL the provider shows in its console.

No ClientSecret for the default no-secret code id_token flow — skip Phase 8.1.1 (Key Vault) entirely, same as Entra External ID. Only a confidential-client override produces a secret; then route it through the Phase 8.1.1 Key Vault / Secret env-var flow and never write it to a plain site setting.

{ProviderName} is the per-provider slug (default OpenIdConnect_1, or a custom slug for multiple instances) — same convention as Phase 8.1.