fix(azuredeployer.gblib): #406, fixing.

This commit is contained in:
Rodrigo Rodriguez 2024-03-30 18:44:28 -03:00
parent fef4e67c43
commit 6e59db6cf2

View file

@ -673,24 +673,19 @@ export class AzureDeployerService implements IGBInstallationDeployer {
} }
public async createApplication(token: string, name: string) { public async createApplication(token: string, name: string) {
return new Promise<string>((resolve, reject) => {
let client = MicrosoftGraph.Client.init({ let client = MicrosoftGraph.Client.init({
authProvider: done => { authProvider: done => {
done(null, token); done(null, token);
} }
}); });
const app = { let app:any = {
displayName: name displayName: name,
signInAudience: "AzureADandPersonalMicrosoftAccount",
}; };
client.api(`/applications`).post(app, (err, res) => { const res = await client.api(`/applications`).post(app);
if (err) {
reject(err); return res;
} else {
resolve(res);
}
});
});
} }
public async createApplicationSecret(token: string, appId: string) { public async createApplicationSecret(token: string, appId: string) {