Microsoft Dynamics
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 ā everything a large organization needs to launch and maintain a mission-critical mobile app.
The Microsoft Dynamics plugin connects your Median app to Dynamics 365 Customer Insights ā Journeys (formerly Dynamics 365 Marketing), giving you bridge-level 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
userIdagainst the device token so Dynamics campaigns target the right profile ā 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.co 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
When to use this plugin
The Microsoft Dynamics plugin is essential for apps that need to:
| Use case | Example |
|---|---|
| Enterprise push orchestration | Trigger push notifications as steps in a Dynamics 365 real-time marketing journey, for example, onboarding sequences, renewal reminders, or event follow-ups. |
| Controlled permission prompting | Delay the push permission dialog until a meaningful moment in the app flow (post-login, post-onboarding) rather than immediately on launch. |
| Permission-aware experiences | Check whether a user has notifications enabled before surfacing push-related settings or suppressing notification CTAs for opted-out users. |
| User-device registration | Bind an authenticated user's UUID to their device token so Dynamics segments and journeys target the correct contact record. |
| Multi-channel attribution | Return APNS/FCM tokens and installationId to your analytics or data warehouse for cross-channel measurement alongside Dynamics engagement data. |
| Registration auditing | Retrieve full device metadata (platform, OS version, timezone, app version) for IT/compliance audits or Dynamics contact enrichment. |
What you'll do
Use this as a map to the sections below:
- Configure Dynamics 365 for mobile push: Complete push channel setup in your Dynamics 365 Customer Insights ā Journeys environment ā upload APNS and FCM credentials and create a mobile app channel.
- Enable the plugin in Median App Studio: Follow Enable the plugin to turn on the Microsoft Dynamics integration for your build.
- Implement push permission flow: Use
promptNotificationPermissionandareNotificationsEnabledto manage the permission prompt in your JavaScript. - Register users on login: Call
registerDevicewith your authenticated user's UUID after sign-in. - Retrieve registration info: Use
registrationInfoduring QA or when passing token data to Dynamics. - Validate end-to-end: Run through the Testing checklist to confirm push delivery works from Dynamics to device.
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 ā 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 cannot re-prompt ā direct users to Settings instead.
- The
userIdpassed toregisterDeviceshould be a stable, alphanumeric UUID that matches the contact identifier in your Dynamics environment. Mismatched identifiers cause targeting failures in journeys.
Plugin setup
Enable the plugin
- Open your app in Median App Studio: Navigate to Push Notifications in your app configuration.
- Select Microsoft Dynamics: Choose Microsoft Dynamics from the list of available push providers.
- Save and rebuild: Save your configuration. A new build is required for the plugin to be active.
Configuration options
| Setting | Description | Default | Recommended |
|---|---|---|---|
| Push provider | Selects Microsoft Dynamics as the push integration for this build | None | Set to Microsoft Dynamics |
| Automatic registration | Controls whether push permission is requested automatically at app launch | Disabled | Disabled ā use promptNotificationPermission for a controlled prompt moment |
Note
Unlike consumer-focused push integrations, the Microsoft Dynamics plugin does not require an SDK key to be entered in the Median dashboard. Authentication between the app and Dynamics is handled via the device registration flow using
registerDeviceand the tokens returned byregistrationInfo, which your backend or Dynamics environment processes directly.
JavaScript bridge functions
Medianās Microsoft Dynamics reference defines the method names and return payloads below. It explicitly says optional callback or returned promise only for promptNotificationPermission and areNotificationsEnabled. For registerDevice, the page shows a single options object (no separate callback argument). Callback shape on this bridge is normally callback inside that same object , not 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 your 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.
āļøMedian JavaScript Bridge
// Using promises (recommended) const result = await median.msdynamics.promptNotificationPermission(); console.log('Permission granted:', result.granted); // Using a callback median.msdynamics.promptNotificationPermission({ callback: function(result) { console.log('Permission granted:', result.granted); }});
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
callback | function | No | Optional callback function. If omitted, a promise is returned. |
Return value:
interface PermissionResult {
granted: boolean; // true if push permission is granted, false otherwise
}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.
āļøMedian JavaScript Bridge
// Using promises (recommended) const result = await median.msdynamics.areNotificationsEnabled(); if (result.granted) { // Show push-related settings or proceed with registration } // Using a callback median.msdynamics.areNotificationsEnabled({ callback: function(result) { console.log('Notifications enabled:', result.granted); }});
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
callback | function | No | Optional callback function. If omitted, a promise is returned. |
Return value:
interface PermissionResult {
granted: boolean; // true if notifications are currently enabled, false otherwise
}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.
āļøMedian JavaScript Bridge
// Using promises (recommended) const result = await median.msdynamics.registerDevice({ userId: 'abc123-user-uuid' }); if (result.success) { console.log('Device registered with Dynamics'); } // Using a callback median.msdynamics.registerDevice( { userId: 'abc123-user-uuid' }, function(result) { console.log('Registration result:', result.success); } );
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Alphanumeric UUID that identifies the user in your Dynamics environment. Must match the contact identifier used in your Dynamics journeys. |
Return value:
interface RegisterDeviceResult {
success: boolean; // true if registration succeeded, false otherwise
}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.
āļøMedian JavaScript Bridge
// Using promises (recommended) const info = await median.msdynamics.registrationInfo(); console.log('Platform:', info.platform); console.log('APNS Token:', info.apnsToken); // iOS only console.log('FCM Token:', info.fcmToken); // Android only console.log('Installation ID:', info.installationId);
Parameters:
None.
Return value:
interface RegistrationInfo {
apnsToken?: string; // iOS only ā Apple Push Notification Service device token
fcmToken?: string; // Android only ā Firebase Cloud Messaging registration token
platform: string; // 'ios' or 'android'
appId: string; // Bundle ID / package name of the app
appVersion: string; // App version string (e.g. '1.0.0')
appBuild: string; // Build number (string on iOS, appVersionCode number on Android)
distribution: string; // 'release' or 'debug'
hardware: string; // CPU architecture (e.g. 'armv8')
installationId: string; // Dynamics installation identifier for this device-user pair
language: string; // Device locale language code (e.g. 'en')
model: string; // Device model name (e.g. 'iPhone')
os: string; // Operating system name (e.g. 'iOS' or 'Android')
osVersion: string; // OS version string (e.g. '17.0')
timeZone: string; // IANA timezone identifier (e.g. 'America/New_York')
isFirstLaunch: boolean; // true if this is the first launch of the app
}Testing checklist
Use this checklist to ensure Microsoft Dynamics is working correctly in your app:
Basic Functionality
-
promptNotificationPermissiondisplays the system dialog on Android 13+ and iOS -
promptNotificationPermissionreturns{ granted: true }after user accepts -
areNotificationsEnabledreturns{ granted: true }when permissions are active -
areNotificationsEnabledreturns{ granted: false }when permissions are denied -
registerDevicereturns{ success: true }with a validuserId -
registrationInforeturns a populated object with all expected fields
Platform Testing
- APNS token is present in
registrationInfoon an iOS device - FCM token is present in
registrationInfoon an Android device -
isFirstLaunchistrueon first app launch andfalseon subsequent launches -
promptNotificationPermissionon Android 12 and below returnsgranted: truewithout 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
registerDevicebefore push permission is granted does not cause a crash - Calling
registrationInfobeforeregisterDevicereturns a populated object (no null reference) - Re-calling
registerDevicewith the sameuserIdsucceeds (idempotent update) - App handles
{ success: false }fromregisterDevicewithout a UI crash
Troubleshooting
Microsoft Dynamics bridge functions are undefined or not working
Ensure the JavaScript Bridge is enabled in Median App Studio and that you are calling bridge functions after the page has fully loaded. Also verify that the Microsoft Dynamics plugin is enabled under Native Plugins in the Median dashboard 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 ā 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 & Download.
`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 Median 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.co, refer to Microsoft Dynamics' integration documentation.
Updated 10 days ago