From where we can get a certificate for our Azure Active Directory App

john john 941 Reputation points
2023-02-06T00:34:33.65+00:00

I created a new ASP.NET Core 6.0 MVC web application using Visual Studio 2022, and I define it to use Azure AD for authentication, as follows:

enter image description here

enter image description here

Then I was asked to create an owned application, so I created one named "ad" as follows:

enter image description here

enter image description here

Inside my application's appsetting.json I have these settings:

{
    "AzureAd": {
        "Instance": "https://login.microsoftonline.com/",
        "Domain": "*****",
        "TenantId": "***",
        "ClientId": "***",
        "CallbackPath": "/signin-oidc"
    },
    ....
}

It seems Visual Studio did all the work for us.

But when I checked the "Certificate & Secrets" in the Azure portal for the generated Azure AD APP, I found that there is not anything assigned:

!

So now we are going to upload a certificate (.crt file), but from where we can get such a certificate, and does Azure provide such certificates?

1: https://i.stack.imgur.com/1veNF.png

2: https://i.stack.imgur.com/S0Kbq.png

3: https://i.stack.imgur.com/U74Ni.png

4: https://i.stack.imgur.com/Pi7nS.png

5: https://i.stack.imgur.com/tQ8lQ.png

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
611 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,473 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 2023-02-06T15:49:03.6533333+00:00

    Hello, Azure AD app certificates can be issued by yourself (for development purposes) or by a third-party CA. The certificate must be a X.509 that:

    • Has 2048-bit or longer keys. 2048-bit size is highly recommended for the best combination of security and performance.
    • Uses the RSA cryptographic algorithm. Azure AD currently supports only RSA.
    • Is signed with the SHA256 hash algorithm. Azure AD also supports certificates signed with SHA384 and SHA512 hash algorithms.

    Take a look to Create and export your public certificate and Generating self-signed certificates for instructions on how to create a self-signed cert. You can also use the former to create a certificate signing request that be sent to a CA.

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    0 comments No comments