web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Microsoft 365 User Account state

(0) ShareShare
ReportReport
Posted on by 415
We have a client (SaaS) that would like to have the Microsoft 365 User Account state that is currently on the User Card page also displayed on the Users page
The value is not stored in a field but is calculated in the OnAfterGetRecord trigger by calling the IsGraphUserAccountEnabled procedure of the Azure AD Graph Codeunit
 
        Microsoft365State := Microsoft365State::Inactive;
        if Rec."Authentication Email" <> '' then
            if AzureADGraph.IsGraphUserAccountEnabled(Rec."Authentication Email", IsGraphUserAccountEnabled) and IsGraphUserAccountEnabled then
                Microsoft365State := Microsoft365State::Active
 
That procedure has a scope of OnPrem
    /// <summary>
    /// Checks if the Microsoft 365 user account for the specified principal name is enabled.
    /// Note: Even if the graph user is enabled, the account may be disabled in Business Central.
    /// </summary>
    /// <param name="UserPrincipalName">The user principal name.</param>
    [Scope('OnPrem')]
    [TryFunction]
    [NonDebuggable]
    procedure IsGraphUserAccountEnabled(UserPrincipalName: Text; var IsEnabled: Boolean)
    begin
        AzureADGraphImpl.IsGraphUserAccountEnabled(UserPrincipalName, IsEnabled);
    end;
 
I can't duplicate the logic on the Users list since they are on SaaS
Any idea on how I can accomplish this request?
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,829 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,057 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 613 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans