New-AzureRmADAppCredential alternative with Microsoft Graph API permissions

Hardik Prajapati 1 Reputation point
2021-11-17T14:21:17.643+00:00

I have a automate build and deployment to add Certificate to Azure AD Application using service principal client id and client secret for authentication.

My current PowerShell script is as below:

"New-AzureRmADAppCredential -ApplicationId $OctopusParameters["ApplicationUserId"] -CertValue $credValue -StartDate $startDate -EndDate $validTo"

Where I give service principal Azure Active Directory Graph Application.ReadWrite.All permission and it works fine.

But now as Azure Active Directory Graph is getting depricated, I want to know the alternative of this using Microsoft Graph API permissions.

I can't change my authentication method and flow as this PowerShell script is used in an automated deployment step.

Please let me know which PowerShell Command I need to use and which Microsoft Graph API permission I need to give to service principal in order to replicate the same effect as my above PowerShell script with Microsoft Graph API permission and without using Azure Active Directory Graph API permission.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,147 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Maggie Rain 161 Reputation points
    2021-11-19T06:58:03.477+00:00

    Hi there, here is the alternative Microsoft Graph API PowerShell script command you can run.

    1 person found this answer helpful.
    0 comments No comments

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.