Managing external identities to enable secure access for partners, customers, and other non-employees
inviteRedirectUrl for Microsoft Entra B2B invitations must be a valid redirect URI according to the platform’s redirect URI rules. For HTTP-based redirect URIs, only localhost is allowed to use the http:// scheme, and all non-localhost redirect URIs must use https://.
The documented rules are:
-
https://is supported for all HTTP-based redirect URIs. -
http://is supported only forlocalhostURIs and only for active local development and testing. - Examples:
-
https://contoso.com– valid -
https://localhost– valid -
http://contoso.com/...– invalid -
http://localhostorhttp://localhost/abc– valid
-
If http://localhost (or http://localhost:<port>/...) is now being rejected in inviteRedirectUrl, this indicates that the invitations API is enforcing stricter validation than the general redirect URI rules and is requiring https:// even for localhost. That aligns with the general guidance that HTTP redirect URIs should be used only for local dev and that production-style flows should use HTTPS.
To get the invitations API working again:
- Change the
inviteRedirectUrlto usehttps://localhost(optionally with a port and path), and ensure the local app is listening on that HTTPS endpoint. - Avoid using
http://forinviteRedirectUrl, even for localhost, as it may now be treated as invalid by the invitations endpoint.
There is no additional configuration or allowlist involved on the Entra side beyond using a redirect URL that conforms to these scheme rules.
References: