fix(azuredeployer.gblib): #406, fixing.
This commit is contained in:
parent
fef4e67c43
commit
6e59db6cf2
1 changed files with 6 additions and 11 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue