Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

IServiceEndpointNotificationService is returning null all the time.

Posted on by 3,610

Below is my code snippet. However, I got null everytime from the service. Any idea how can I resolve it?

IServiceEndpointNotificationService cloudService = (IServiceEndpointNotificationService)serviceProvider.GetService(typeof(IServiceEndpointNotificationService));
            if (cloudService == null)
                throw new InvalidPluginExecutionException("Failed to retrieve the service bus service.");

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: IServiceEndpointNotificationService is returning null all the time.

    Hi,

    Can you try executing below code without checking null to see if it works.

    string response = cloudService.Execute(new EntityReference("serviceendpoint",

                   serviceEndpointId),

                   context);

  • Mohsin Ali Profile Picture
    Mohsin Ali 3,610 on at
    RE: IServiceEndpointNotificationService is returning null all the time.

    Service endpoints are already registered.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: IServiceEndpointNotificationService is returning null all the time.

    Hello,

    You will have to register service endpoint first using Plugin registration tool where you need to provide service bus connection string.

    docs.microsoft.com/.../walkthrough-configure-azure-sas-integration

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans