steffow / meteor-accounts-saml

SAML SP tested with OpenAM
27 stars 29 forks source link

Make this package work with Azure Devops #34

Closed betesh closed 1 year ago

betesh commented 4 years ago

I don't expect you to merge this. I'm opening a PR just to give some visibility to the fact that I got this working with Microsoft Azure after several hours of effort, so that anyone else trying to do the same doesn't have to reinvent the wheel.

My configuration looked something like this:

const provider = SOME_ARBITRARY_NAME;

Meteor.settings = {
  "debug": true,
  "saml": [
    {
      "provider": provider,
      "entryPoint": "https://login.microsoftonline.com/CORPORATE_ACCOUNT_ID/saml2",
      "issuer": NAME_CHOSEN_FOR_AZURE_APP,
      "idpSLORedirectURL": "https://sts.windows.net/CORPORATE_ACCOUNT_ID/",
      "dynamicProfile": true,
      "localProfileMatchAttribute": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
    }
  ]
}

Meteor.loginWithSaml({provider: provider}, function(error, result) {
  if (error) {
    // handle error
  } else {
    // handle success
  }
});