question

DnyaneshwarSurywanshi-3200 avatar image
0 Votes"
DnyaneshwarSurywanshi-3200 asked ·

How to generate Seccurity PIN from Recovery Services vault using .Net SDK or Fluent API ?

I am using MARS agent to backup VM drive, Folder, Files for that I need to pass Security PIN
Set-OBMachineSetting -EncryptionPassPhrase $PassPhrase -SecurityPin "<generatedPIN>"
Currently I am passing manually from azure portal (attached screenshot).
Now I want to generate Security PIN using .Net SDK or any Fluent API so I can pass that at deployment time as parameter.

73703-generatesecuritypin.png


azure-site-recovery
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Currently I am trying with below code but getting null reference.
using Microsoft.Azure.Management.RecoveryServices.Backup;
public static class GenerateSecurityPIN
{
private static readonly ISecurityPINsOperations Operations1;
var pin= SecurityPINsOperationsExtensions.Get(Operations1,"vaultName", "resourceGropuName");
}
Referencing below links :
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.recoveryservices.backup.securitypinsoperationsextensions?view=azure-dotnet

Please help me on this






0 Votes 0 ·

1 Answer

SadiqhAhmed-MSFT avatar image
0 Votes"
SadiqhAhmed-MSFT answered ·

@DnyaneshwarSurywanshi-3200 - Thank you for your post and I apologize for the delayed response!

Generating and submitting PIN is supposed to be a manual operation, like OTP and was primarily intended to be a portal only multi-user authentication experience. Since REST API is present, theoretically you could have SDKs generated out of it but it is not meant to be used programmatically.

May I know the end-to-end scenario that you are planning to implement?


If the response helped, do "Accept Answer" and up-vote it

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.