Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article shows how to authenticate with Azure Event Grid namespace using JSON Web Tokens.
OAuth 2.0 (JSON Web Token) authentication allows clients to authenticate and connect with the MQTT broker using JSON Web Tokens (JWT) issued by any OpenID Connect identity provider, apart from Microsoft Entra ID. MQTT clients can get their token from their identity provider and provide the token in the MQTTv5 or MQTTv3.1.1 CONNECT packets to authenticate with the MQTT broker. This authentication method provides a lightweight, secure, and flexible option for MQTT clients that aren't provisioned in Azure.
Note
This feature is currently in preview.
High-level steps
To use OAuth 2.0 JWT authentication for namespaces, follow these steps:
- Create a namespace and configure its subresources.
- Enable managed identity on your Event Grid namespace.
- Configure OAuth 2.0 authentication settings on your Event Grid namespace by following these steps:
- Create an Azure Key Vault account that hosts the CA certificate that includes your public keys and add role assignment in Key Vault for the namespace’s managed identity.
- Upload the Privacy-Enhanced Mail (PEM) file of your public key certificates to namespace.
- Your clients can connect to the Event Grid namespace using the tokens provided by your identity provider.
Next step
For step-by-step instructions, see Authenticate with MQTT broker using OAuth 2.0 authentication.