SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
235 stars 67 forks source link

Forwarding has been changed to a "Recipient Mapping" #220

Closed ryanfog closed 5 years ago

ryanfog commented 5 years ago

Describe the bug The method of setting a forward is no longer working. It appears that Google may have updated its API. The new method appears to be via "recipient mapping"

Scenario: You are migrating from Google to Exchange and you need to forward new messages over to Exchange.

scrthq commented 5 years ago

Hey @ryanfog - Are you talking about adding a ForwardingAddress via Gmail API? Documentation appears the same in regards to that: https://developers.google.com/gmail/api/v1/reference/users/settings/forwardingAddresses/create

What PSGSuite function is impacted by this change? If you're referring to this, that wouldn't impact PSGSuite (or any API usage) that I'm aware of as there isn't a way to manage that setting via API call (that comes to mind anyway)

Hummuna commented 5 years ago

@scrthq I get a 500 error from the API response. When attempting to do this manually I noticed this. GSuiteForwarding

Considering forwarding is no longer able to be done at the end user level but rather requires it to be done at the application configuration level I believe that is why the API is responding with a 500 error.

Recipient Mapping over taking the Forwarding Address

scrthq commented 5 years ago

What API are you trying to use? There's no API that I'm aware of that can manage the Email Routing within Gmail Advanced Settings. Still a bit confused as to what's breaking in PSGSuite tbh @ryanfog

scrthq commented 5 years ago
Hummuna commented 5 years ago

@scrthq Not sure why but I am now getting a healthy response I suppose not an error. I wish I could have grabbed a screenshot of the error but working off client laptop and blocks github.

Response I am getting now using Add-GSGmailFowardingAddress is

USER, ForwardingEmail, VerificationStatus

Status is returned pending

scrthq commented 5 years ago

Got it! So that would be different than the screenshot you posted above. The one above is email routing, which isn't configurable via API call, but you're working on adding a forwarding address via Gmail API. Similar, but different.

The response status is pending as the forwarding address will receive an email to confirm they accept the user adding their address as a forwarding address. This is typical.

scrthq commented 5 years ago

hey @ryanfog + @Hummuna - closing this since it's regarding changes with Email Routing, not Forwarding Addresses in Gmail API. Let me know if there are any questions regarding this!