How to make excel VBA as SAML client

AMBAR RAY 1 Reputation point
2023-05-16T10:15:16.35+00:00

We have configured our Web API application to use SAML authentication, the identity provider being Azure AD v1.0 We wish to authenticate from excel VBA and call Web API by passing the SAML assertion returned post authentication to the request header of the Web API request. How to do it in excel VBA? Any code snippet and steps thereof would help.

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,663 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,212 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 29,006 Reputation points Microsoft Employee
    2023-05-17T08:13:11.2566667+00:00

    Hi @AMBAR RAY ,

    Thanks for reaching out.

    Implementing SAML authentication in Excel VBA can be complex, and it's recommended to have a solid understanding of SAML and the Azure AD configuration. There is no direct reference, but you will find SAML and Azure AD configuration which you can used to implement your scenario.

    To implement SAML authentication in Excel VBA, you can use a SAML library that supports VBA, such as the SAML Toolkit for VBA from ComponentSpace and Configure the SAML settings for your application, such as the SAML endpoint URLs and certificate information.

    1. Use the SAML library to generate a SAML request and send it to the identity provider.
    2. Receive the SAML response from the identity provider and validate it using the SAML library.
    3. Extract the user attributes from the SAML response and use them to authenticate the user in your Excel VBA application.

    Hope this will help.

    Thanks,

    Shweta

    1 person found this answer helpful.