We are using API key to call custom API from B2C custom policy as part of seamless migration. We are looking for automated way to rotate policy key.
I have tried following C# code using graph client and its updating new key but wanted to know if there is PS command to perform similar kind of operation?
C# code:
var result = graphClient.TrustFramework.KeySets["B2C_1A_keyset"]
.UploadSecret(use, k, nbf, exp)
.Request()
.PostAsync().Result;
if (result != null)
Console.WriteLine("Updated policy key secret");