This repository was archived by the owner on Jul 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ namespace Microsoft.Store.PartnerCenter.PowerShell.Commands
1010 using System . Text ;
1111 using Extensions ;
1212 using Identity . Client ;
13+ using Microsoft . Azure . Management . Billing ;
14+ using Microsoft . Graph ;
1315 using Models . Authentication ;
1416 using Newtonsoft . Json . Linq ;
1517 using Utilities ;
@@ -189,6 +191,19 @@ public override void ExecuteCmdlet()
189191
190192 Scopes = PowerShellModule . KnownModules [ Module ] . Scopes . ToArray ( ) ;
191193 }
194+ else if ( ParameterSetName . Equals ( RefreshTokenParameterSet , StringComparison . InvariantCultureIgnoreCase ) )
195+ {
196+ if ( Credential != null )
197+ {
198+ account . ObjectId = Credential . UserName ;
199+ account . SetProperty ( PartnerAccountPropertyType . ServicePrincipalSecret , Credential . Password . ConvertToString ( ) ) ;
200+ applicationId = Credential . UserName ;
201+ }
202+ else
203+ {
204+ applicationId = ApplicationId ;
205+ }
206+ }
192207 else if ( ParameterSetName . Equals ( ServicePrincipalCertificateParameterSet , StringComparison . InvariantCultureIgnoreCase ) )
193208 {
194209 account . SetProperty ( PartnerAccountPropertyType . ApplicationId , ApplicationId ) ;
You can’t perform that action at this time.
0 commit comments