Skip to main content
Enterprise pluginThe Microsoft Dynamics integration is available on Median’s Business and Enterprise plans. These plans include expert app development, advanced native plugin access, dedicated technical support, and guaranteed App Store publishing.
The Microsoft Dynamics plugin connects your Median app to Dynamics 365 Customer Insights – Journeys (formerly Dynamics 365 Marketing), giving you JavaScript Bridge control over push permission flows, device registration, and APNS/FCM token management. Use this plugin when your organization runs customer journey orchestration in Dynamics and needs to reach users with native push notifications. The plugin exposes a lightweight Median JavaScript Bridge surface that covers the full push lifecycle: prompting for permission, querying permission state, registering a device-user binding with Dynamics, and retrieving the registration metadata your Dynamics environment expects for targeting and troubleshooting.

Why use Microsoft Dynamics

  • Unified push in your Dynamics ecosystem: Extend real-time customer journeys into mobile without a separate push provider. Push notifications are orchestrated directly from Dynamics 365 Customer Insights – Journeys alongside your email, SMS, and in-app channels.
  • Bridge-first permission control: Request and check push notification permission entirely from JavaScript, giving you full control over the timing and context of the permission prompt without writing native code.
  • Precise user-device binding: Register a specific userId against the device token so Dynamics campaigns target the right profile. This is essential for enterprises with strict user-identity requirements.
  • Token and metadata transparency: Retrieve APNS and FCM tokens plus rich device metadata (installationId, os, model, timeZone) for registration audits, support workflows, and cross-channel attribution.

Prerequisites

  • A Median app with the JavaScript Bridge enabled
  • A licensed Dynamics 365 Customer Insights – Journeys environment with mobile push configured
  • Push channel setup completed in Dynamics 365 Marketing (iOS APNS certificate or token + Android FCM server key)
  • Alphanumeric user identifiers (UUIDs) available at the point of registration in your web application

Key terms

The following terms are specific to the Microsoft Dynamics push integration and will help you implement the plugin correctly: Customer Insights – Journeys: The Dynamics 365 module (formerly Dynamics 365 Marketing) is responsible for real-time marketing journeys, including push notification delivery. Push configuration and campaign management happen here. Mobile app channel: A Dynamics 365 configuration entity that stores your iOS APNS and Android FCM credentials, links them to a Dynamics environment, and issues the channel ID used during device registration. APNS token: The Apple Push Notification Service device token issued to an iOS device. Returned by registrationInfo and required by Dynamics to deliver push to that device. FCM token: The Firebase Cloud Messaging registration token issued to an Android device. Returned by registrationInfo and required by Dynamics to deliver push to that device. Installation ID: A Dynamics-side identifier that uniquely tracks a device-user pair within your mobile app channel. Returned in registrationInfo and useful for support lookups and registration audits. Important considerations
  • On Android 13 (API 33) and above, the system displays a push permission dialog when you call promptNotificationPermission. On Android 12 and below, permission is granted automatically without a user dialog.
  • On iOS, the system prompt is shown once per app install. If a user has previously denied permission, you can’t re-prompt. Direct users to Settings instead.
  • The userId passed to registerDevice should be a stable, alphanumeric UUID that matches the contact identifier in your Dynamics environment. Mismatched identifiers cause targeting failures in journeys.

Integration guide

Enable the plugin

  1. Open your app in Median App Studio: Go to Native Plugins.
  2. Enable Microsoft Dynamics 365: Turn on the plugin and enter the values from your Dynamics mobile app configuration in the plugin settings.
  3. Save and rebuild: Save your configuration. A new build is required for the plugin to be active.

Configuration options

Copy these values from the mobile app configuration in Dynamics 365 Customer Insights – Journeys.
All four settings are requiredIf a value is missing or empty, device registration fails and the JavaScript Bridge returns an error. Fill in all four settings before you rebuild.

JavaScript Bridge functions

Only promptNotificationPermission and areNotificationsEnabled are documented with an optional callback or returned promise. On the JavaScript Bridge, a callback is normally passed as a callback property inside the options object, not as a second function parameter. If await on registerDevice or registrationInfo does not behave as expected in your build, call them without await and use a callback property or .then() only after confirming what the JavaScript Bridge returns.

Prompt for push notification permission

Requests push notification permission from the user. On Android 13+, this displays the system permission dialog. On Android 12 and below, permission is granted silently. On iOS, the system authorization dialog is presented. Provide a callback or use the returned promise.
Parameters: Return value:

Check push notification permission status

Checks the current push notification permission status without prompting the user. Use this to gate push-related UI or analytics before prompting or registering.
Parameters: Return value:

Register device

Registers a new user-device pair with Microsoft Dynamics or updates an existing registration. Call this after your user authenticates so the device token is bound to the correct Dynamics contact record.
Parameters: Return value:

Return registration info

Returns the full registration and device metadata for the current app installation. Use this to retrieve APNS/FCM tokens for passing to Dynamics, to verify registration state, or for support and compliance audits.
Parameters: None. Return value:

Testing checklist

Use this checklist to ensure Microsoft Dynamics is working correctly in your app: Basic functionality
  • promptNotificationPermission displays the system dialog on Android 13+ and iOS
  • promptNotificationPermission returns { granted: true } after user accepts
  • areNotificationsEnabled returns { granted: true } when permissions are active
  • areNotificationsEnabled returns { granted: false } when permissions are denied
  • registerDevice returns { success: true } with a valid userId
  • registrationInfo returns a populated object with all expected fields
Platform testing
  • APNS token is present in registrationInfo on an iOS device
  • FCM token is present in registrationInfo on an Android device
  • isFirstLaunch is true on first app launch and false on subsequent launches
  • promptNotificationPermission on Android 12 and below returns granted: true without a dialog
Dynamics end-to-end
  • Device registration is reflected in the Dynamics 365 Customer Insights – Journeys mobile app channel
  • A test push notification sent from Dynamics is received on an iOS test device
  • A test push notification sent from Dynamics is received on an Android test device
  • Tapping a notification opens the correct URL or in-app destination
Edge cases
  • Calling registerDevice before push permission is granted does not cause a crash
  • Calling registrationInfo before registerDevice returns a populated object (no null reference)
  • Re-calling registerDevice with the same userId succeeds (idempotent update)
  • App handles { success: false } from registerDevice without a UI crash

Troubleshooting

Microsoft Dynamics JavaScript Bridge functions are undefined or not working

Ensure the JavaScript Bridge is enabled in App Studio and that you are calling JavaScript Bridge functions after the page has fully loaded. Also verify that the Microsoft Dynamics plugin is enabled under Native Plugins in App Studio and that a new build has been generated after enabling it.

Push permission dialog is not appearing on Android

On Android 12 and below, permission is granted automatically and no system dialog is shown. The dialog only appears on Android 13 (API 33) and above. If you expect a dialog on Android 12, this is expected behavior. Verify the OS version of the test device and adjust your UX flow to handle the silent-grant path gracefully.

registerDevice returns { success: false } or fails silently

Check the following: push notification permission has been granted before calling registerDevice (use areNotificationsEnabled first); the userId passed is a stable alphanumeric UUID that matches your Dynamics contact identifiers; and your Dynamics 365 mobile app channel has APNS (iOS) and/or FCM (Android) credentials correctly configured. Mismatched or missing credentials on the Dynamics side will cause registration to fail.

Device registration is not appearing in Dynamics 365

Confirm that your Dynamics 365 Customer Insights – Journeys environment has the mobile app channel configured with the correct APNS and FCM credentials. Verify that the userId passed to registerDevice matches an existing contact record identifier in Dynamics. If registration completes with { success: true } but the device does not appear in Dynamics, the issue is likely on the Dynamics configuration side. Check the mobile app channel settings and consult Dynamics push setup documentation.

Push notifications are not being delivered to the device

Verify that registrationInfo returns populated apnsToken (iOS) or fcmToken (Android) fields. A missing token means the device is not registered for push. Confirm push permission is granted with areNotificationsEnabled. On the Dynamics side, ensure the journey or message is targeting the correct segment and that the mobile app channel is active. For Android, check that google-services.json is uploaded in App Studio → Build & Deploy.

registrationInfo returns empty or null token fields

Token fields (apnsToken, fcmToken) are only populated after registerDevice has been called successfully and push permission has been granted. Call promptNotificationPermission and confirm permission is granted, then call registerDevice with a valid userId before querying registrationInfo. If tokens remain empty after a successful registration, rebuild the app in App Studio to ensure the latest plugin configuration is included.
Still having trouble?For issues related to Microsoft Dynamics’ own configuration, permissions, or platform-specific behavior outside of Median, refer to Microsoft Dynamics’ integration documentation.
Last modified on November 30, 2026