Using AI-plugin (Azure Logic App) with M365 Agents Toolkit

Shreya Reddi 0 Reputation points
2025-07-28T23:46:52.4366667+00:00

Hi, I'm currently working with the M365 Agents Toolkit to create an agent. The action the agent has connects to an Azure Logic App (which basically functions as a REST API by hitting an endpoint) and executes the workflow.

My agent was able to execute the Logic App up until Friday and is now running into errors. What might be the issue? The adaptive card to call the logic app appears and the parameters are formatted correctly, however, the run never shows up on the Azure portal. The agent tells me there was a problem calling the App but doesn't specify.

What might be the problem?

Microsoft Copilot | Microsoft 365 Copilot | Development
{count} votes

1 answer

Sort by: Most helpful
  1. Karan Shewale 1,040 Reputation points Microsoft External Staff
    2025-07-29T05:13:27.3366667+00:00

    Hi Shreya,

    Since your M365 Agent with Azure Logic App integration was working until Friday and now fails without showing runs in Azure Portal, this suggests an authentication, connectivity, or service-level issue rather than a code problem.

    Most Likely Causes (Weekend Issues)

    1. Authentication Token Expiration

    Common weekend issue:

    • Service principal tokens often expire on weekends
    • OAuth tokens may have expired
    • API keys or connection strings might have been rotated
    1. Azure Logic App Service Issues

    Check Azure Status:

    • Azure Service Health for Logic Apps in your region
    • Potential service outages over the weekend
    • Maintenance windows affecting Logic App execution
    1. Network/Firewall Changes

    IT changes over weekend:

    • Firewall rules modified
    • Network policies updated
    • Conditional Access policies changed

    Immediate Troubleshooting Steps

    Step 1: Verify Logic App Status

    1. Azure PortalLogic AppsYour Logic App
    2. Overview → Check Status (should be "Enabled")
    3. Run History → Verify no runs appearing since Friday
    4. Monitoring → Check for any error logs

    Step 2: Test Logic App Directly

    Bypass the agent:

    1. Copy Logic App HTTP endpoint
    2. Test with Postman/curl directly
    3. Use same parameters the agent sends
    4. Check if Logic App responds

    Step 3: Check Agent Plugin Configuration

    In M365 Agents Toolkit:

    1. AI-plugin manifest → Verify endpoint URLs unchanged
    2. Authentication settings → Check if tokens/keys expired
    3. Test plugin independently from agent

    Step 4: Review Azure Logic App Logs

    Azure Portal → Logic App → Monitoring → Diagnostics Look for: - Authentication failures - Network connectivity issues - Timeout errors - Service unavailable errors

    Common Solutions

    Fix 1: Refresh Authentication

    If using service principal:

    1. Azure ADApp registrationsYour app
    2. Certificates & secretsRenew client secrets
    3. Update agent configuration with new credentials

    Fix 2: Logic App Restart

    Simple restart often fixes weekend issues:

    1. Azure PortalLogic AppOverview
    2. Disable the Logic App
    3. Wait 2-3 minutes
    4. Enable the Logic App
    5. Test immediately

    Fix 3: Check Resource Limits

    Azure subscription limits:

    1. Logic App pricing tier → Check if limits reached
    2. Consumption plan → Verify execution quota
    3. Resource group → Check resource limits

    Fix 4: Update Agent Plugin

    Re-register the plugin:

    1. M365 Agents ToolkitRe-import AI-plugin
    2. Test connection to Logic App
    3. Verify adaptive card still renders correctly

    Debugging Strategy Test This Sequence: 1. Direct Logic App test (Postman) ✓/✗ 2. Agent plugin test (without full agent) ✓/✗   3. Full agent execution ✓/✗ 4. Check where the chain breaks

    Log Analysis:

    Check these logs in order:

    1. Azure Logic App diagnostics
    2. M365 Agents Toolkit logs
    3. Teams/M365 Copilot logs (if applicable)
    4. Network/firewall logs

    Expected Findings

    If Logic App Direct Test Fails:

    • Authentication issue (expired tokens/keys)
    • Logic App service problem
    • Azure resource limits reached

    If Logic App Works but Agent Fails:

    • Plugin configuration issue
    • Agent authentication to Logic App
    • M365 Agents Toolkit service connectivity

    If Everything Tests Fine:

    • Caching issues in M365 services
    • Regional service problems
    • Intermittent connectivity issues

    Quick Resolution Steps

    Try these in order:

    1. Restart Logic App (2 minutes)
    2. Test direct Logic App endpoint (5 minutes)
    3. Refresh agent plugin registration (10 minutes)
    4. Check Azure service health (2 minutes)

    The fact that it worked Friday and failed over the weekend strongly suggests an authentication expiration or service maintenance issue. Start with the Logic App restart and direct endpoint test first.

    Thanks,  

    Karan Shewale. 

    *************************************************************************  

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate. 


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.