How to use the office-addin-manifest.readManifestFile function in office-addin-manifest

To help you get started, we’ve selected a few office-addin-manifest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OfficeDev / Office-Add-in-NodeJS-SSO / SSOAutoSetup / src / configure / configure.js View on Github external
async function configureSSOApplication() {
    // Check to see if Azure CLI is installed.  If it isn't installed then install it
    const cliInstalled = await azureCliInstalled();
    if(!cliInstalled) {
        console.log("Azure CLI is not installed.  Installing now before proceeding");
        await installAzureCli();
        console.log('Please close your command shell, reopen and run configure-sso again.  This is neccessary to register the path to the Azure CLI');
        return;
    }

    const userJson = await logIntoAzure();
    if (userJson) {
        console.log('Login was successful!');
        const manifestInfo = await manifest.readManifestFile(defaults.manifestPath);
        const applicationJson = await createNewApplication(manifestInfo.displayName);
        ssoAppData.writeApplicationData(applicationJson.appId);
        const secretJson = await setApplicationSecret(applicationJson);
        ssoAppData.addSecretToCredentialStore(manifestInfo.displayName, secretJson.secretText);
        updateProjectManifest(applicationJson.appId);
        await logoutAzure();
        console.log("Outputting Azure application info:\n");
        console.log(applicationJson);
        
    }
    else {
        throw new Error(`Login to Azure did not succeed.`);
    }
}

office-addin-manifest

Read and modify Office Add-in manifest files.

MIT
Latest version published 19 days ago

Package Health Score

83 / 100
Full package analysis