jeffcarbs / omniauth-office365 Goto Github PK
View Code? Open in Web Editor NEWOmniAuth OAuth2 strategy for the Office365 v2.0 REST API
License: MIT License
OmniAuth OAuth2 strategy for the Office365 v2.0 REST API
License: MIT License
Hi there, I'm attempting to use your gem to grab oauth2 credentials from Microsoft to access Outlook. I keep receiving this error chain (here's the output from my log):
Started GET "/auth/office365" for 76.21.4.108 at 2017-03-28 19:39:58 +0000
(office365) Request phase initiated.
Started GET "/auth/office365/callback?code=AQABAAIAAABnfiG-mA6NTae7CdWW7QfdzytQ0_8r1J-iqN6ssQ5rwhfSlo6A98_D1iOtONxSjbooyTppxMGORbhbaXR5L4fDjopDFjuNcgUNYQgXvfyTyvtNLAYNEwOJQVgEwDc0NBWTTO58a6XdafGcJg9_RlE0RJ5f2BRpRGUWZqeFuOjUSJZPpOSF2CaDK1Sol7xCsolyyBQmpqGci4e8TvvPCVz66nkiMUC1BbOeMQ0Als0B7Ul5A6XY3_FXieMMtFaIihAmGRGSwBFgscnQyopI5diO_yTSGACr81n9KTONdDxANRa_UPDVfj4UhNgVGcgk4H0nbtRjEcSzhr3HmiBhCdx-XaOO8mkBbDXV-UCCOM9xCzk80HV8FohaP5-IQJDrAexWnYJRPVinqXYvm_UVaZhGNkMd_uQsGL839gyzGefRqE38pIBLLB1ybfdvj1vcnypo-R8rG8H9k36RzxryiTPADXafPONxqXIkCKyFHruY_V4TqQRdNFZ9_iOG11mmkgoS4rrMHXAZkyaNQffOy63kJ3igFIUyrfWrKmxPTD_JxRT5V37IlTEB5cuFsYBQiX4gAA&state=de31e16017276349b98454837d009a151e63af27e74f51a3&session_state=0a9aa0a0-bc11-4f13-b8c6-4130d81514d3" for 76.21.4.108 at 2017-03-28 19:40:06 +0000
(office365) Callback phase initiated.
(office365) Authentication failure! invalid_credentials: OAuth2::Error, invalid_client: AADSTS70002: Error validating credentials. AADSTS50011: The reply address 'https://dev.example.com/auth/office365/callback?code=AQABAAIAAABnfiG-mA6NTae7CdWW7QfdzytQ0_8r1J-iqN6ssQ5rwhfSlo6A98_D1iOtONxSjbooyTppxMGORbhbaXR5L4fDjopDFjuNcgUNYQgXvfyTyvtNLAYNEwOJQVgEwDc0NBWTTO58a6XdafGcJg9_RlE0RJ5f2BRpRGUWZqeFuOjUSJZPpOSF2CaDK1Sol7xCsolyyBQmpqGci4e8TvvPCVz66nkiMUC1BbOeMQ0Als0B7Ul5A6XY3_FXieMMtFaIihAmGRGSwBFgscnQyopI5diO_yTSGACr81n9KTONdDxANRa_UPDVfj4UhNgVGcgk4H0nbtRjEcSzhr3HmiBhCdx-XaOO8mkBbDXV-UCCOM9xCzk80HV8FohaP5-IQJDrAexWnYJRPVinqXYvm_UVaZhGNkMd_uQsGL839gyzGefRqE38pIBLLB1ybfdvj1vcnypo-R8rG8H9k36RzxryiTPADXafPONxqXIkCKyFHruY_V4TqQRdNFZ9_iOG11mmkgoS4rrMHXAZkyaNQffOy63kJ3igFIUyrfWrKmxPTD_JxRT5V37IlTEB5cuFsYBQiX4gAA&state=de31e16017276349b98454837d009a151e63af27e74f51a3&session_state=0a9aa0a0-bc11-4f13-b8c6-4130d81514d3' does not match the reply address 'https://dev.example.com/auth/office365/callback' provided when requesting Authorization code.
Trace ID: 154ea3f3-9f24-4599-a7c9-e3f29c6a3800
Correlation ID: 42bf9100-12a7-4510-b5a2-52f084d5321c
Timestamp: 2017-03-28 19:39:13Z
{"error":"invalid_client","error_description":"AADSTS70002: Error validating credentials. AADSTS50011: The reply address 'https://dev.example.com/auth/office365/callback?code=AQABAAIAAABnfiG-mA6NTae7CdWW7QfdzytQ0_8r1J-iqN6ssQ5rwhfSlo6A98_D1iOtONxSjbooyTppxMGORbhbaXR5L4fDjopDFjuNcgUNYQgXvfyTyvtNLAYNEwOJQVgEwDc0NBWTTO58a6XdafGcJg9_RlE0RJ5f2BRpRGUWZqeFuOjUSJZPpOSF2CaDK1Sol7xCsolyyBQmpqGci4e8TvvPCVz66nkiMUC1BbOeMQ0Als0B7Ul5A6XY3_FXieMMtFaIihAmGRGSwBFgscnQyopI5diO_yTSGACr81n9KTONdDxANRa_UPDVfj4UhNgVGcgk4H0nbtRjEcSzhr3HmiBhCdx-XaOO8mkBbDXV-UCCOM9xCzk80HV8FohaP5-IQJDrAexWnYJRPVinqXYvm_UVaZhGNkMd_uQsGL839gyzGefRqE38pIBLLB1ybfdvj1vcnypo-R8rG8H9k36RzxryiTPADXafPONxqXIkCKyFHruY_V4TqQRdNFZ9_iOG11mmkgoS4rrMHXAZkyaNQffOy63kJ3igFIUyrfWrKmxPTD_JxRT5V37IlTEB5cuFsYBQiX4gAA&state=de31e16017276349b98454837d009a151e63af27e74f51a3&session_state=0a9aa0a0-bc11-4f13-b8c6-4130d81514d3' does not match the reply address 'https://dev.example.com/auth/office365/callback' provided when requesting Authorization code.\r\nTrace ID: 154ea3f3-9f24-4599-a7c9-e3f29c6a3800\r\nCorrelation ID: 42bf9100-12a7-4510-b5a2-52f084d5321c\r\nTimestamp: 2017-03-28 19:39:13Z","error_codes":[70002,50011],"timestamp":"2017-03-28 19:39:13Z","trace_id":"154ea3f3-9f24-4599-a7c9-e3f29c6a3800","correlation_id":"42bf9100-12a7-4510-b5a2-52f084d5321c"}
Processing by AuthController#failure as HTML
Parameters: {"code"=>"AQABAAIAAABnfiG-mA6NTae7CdWW7QfdzytQ0_8r1J-iqN6ssQ5rwhfSlo6A98_D1iOtONxSjbooyTppxMGORbhbaXR5L4fDjopDFjuNcgUNYQgXvfyTyvtNLAYNEwOJQVgEwDc0NBWTTO58a6XdafGcJg9_RlE0RJ5f2BRpRGUWZqeFuOjUSJZPpOSF2CaDK1Sol7xCsolyyBQmpqGci4e8TvvPCVz66nkiMUC1BbOeMQ0Als0B7Ul5A6XY3_FXieMMtFaIihAmGRGSwBFgscnQyopI5diO_yTSGACr81n9KTONdDxANRa_UPDVfj4UhNgVGcgk4H0nbtRjEcSzhr3HmiBhCdx-XaOO8mkBbDXV-UCCOM9xCzk80HV8FohaP5-IQJDrAexWnYJRPVinqXYvm_UVaZhGNkMd_uQsGL839gyzGefRqE38pIBLLB1ybfdvj1vcnypo-R8rG8H9k36RzxryiTPADXafPONxqXIkCKyFHruY_V4TqQRdNFZ9_iOG11mmkgoS4rrMHXAZkyaNQffOy63kJ3igFIUyrfWrKmxPTD_JxRT5V37IlTEB5cuFsYBQiX4gAA", "state"=>"de31e16017276349b98454837d009a151e63af27e74f51a3", "session_state"=>"0a9aa0a0-bc11-4f13-b8c6-4130d81514d3"}
Completed 400 Bad Request in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms)
In my omniauth initializer, I have:
provider :office365, <<APP_ID>>, <<APP_SECRET>>, scope: "https://outlook.office.com/mail.read offline_access"
The redirect URI I've specified on apps.dev.microsoft.com
is https://dev.example.com/auth/office365/callback
(with my own domain in place of example.com
). I've successfully done this same thing with Google, Salesforce, Twitter, and a bunch more, and I'm wondering if this is due to your gem or something else. Ever run into this before?
How do I go about including multiple scopes? If I include any more than one I get AADSTS70011: The provided value for the input parameter 'scope' is not valid. The scope Contacts.Read, Mail.Read is not valid.
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.