Unknown error on Google Appscript RoleAssignments - google-apps-script

i am trying to update user's role based on a CSV and decided to use App Script. Everything went well, from listing roles, getting & updating users, until inserting role assignment.
AdminDirectory.RoleAssignments.insert({
roleId: ROLE_ID,
assignedTo: data.user_id,
scopeType: 'CUSTOMER',
orgUnitId: ORG_UNIT_ID,
}, 'my_customer')
I am stuck now since the error log only show "Unknown Error"
GoogleJsonResponseException: API call to directory.roleAssignments.insert failed with error: Unknown Error.
Any help?
Thanks in advance.

It looks like the error stems from the fact that you are trying to insert an assignment role which already exists.
There is already an open issue on Google's Issue Tracker regarding this.
I suggest you star the issue here and eventually add a comment saying that you are affected by it.

Related

Where do I get support when graph.microsoft.com suddenly starts returning errors for requests that were recently working?

This morning, multiple client accounts started returning this error when attempting to use their refresh_token to obtain a new access token:
refreshAccessToken error response:
{
"error": "invalid_client",
"error_description": "AADSTS70002: Error validating credentials. AADSTS50012: No client secret is provisioned in the store.",
"error_codes": [70002, 50012],
"timestamp": "2018-04-06 08:39:48Z",
"trace_id": "40f2883e-68c2-4a15-87e9-8544c3430c00",
"correlation_id": "a3536a53-b5ad-4494-ba43-a039c6bcfb45"
}
This smells like a system problem. Where/how does one contact Microsoft or do they report system status errors somewhere?
Thanks!
There is a feedback forum for each Azure service area that you can use to report a bug. You can make a post here:
https://feedback.azure.com/forums/169401-azure-active-directory
I'm not sure if this is the correct link:
https://github.com/microsoftgraph/microsoft-graph-docs/issues
Its the Issue Tracker for the Graph Documentation, but there are multiple non Documentation related bugs submitted.
There seems no direct way to report a bug
(got this link from the support site https://developer.microsoft.com/en-us/graph/support)

Getting occasional error getting user from Google PlusDomains

I have an app that make the following call successfully for 99% of the users:
var profile = PlusDomains.People.get(userId);
However, some users consistently have the following error:
GoogleJsonResponseException: Not Found at fetchPhoto
When I manually go to plus.google.com/(userId) the user is there so I know the userId is good. Has anyone seen this or has any idea why it is (rarely) happening?
Thanks for any tips or pointers.

Is bucket creation possible at this time?

Following several blogs, docs, and tutorials I have registered an app, fetched a token for data:read, write, bucket:read, create, but when attempting to create a bucket I get an BadRequest error stating "Object is missing".
{
"developerMessage":"Object is missing",
"userMessage":"",
"errorCode":"",
"more info":"http://developer.api.autodesk.com/documentation/v1/errors/"
}
I submit {"bucketKey":"lower case guid", "policyKey":"transient"}
Kind regards
Thanks Augusto.
We did indeed have a trailing "/" at the end of the url https://developer.api.autodesk.com/oss/v2/buckets and that's what broke it. took it away and it works as expected now.
Cheers,
Gregor

Newbie: Getting basic app script to work, encountered AppKey error

I am following the instructions here to get a basic appscript to work. When I load the given page ("quickstart.html"), it does properly prompt me to "authorize" the connection. After authorizing, it redirects me to an error page with the error:
[ORIGINAL ERROR] generic::not_found: com.google.apps.docs.error.DocumentNotFoundException: Invalid or missing required AppKey
The invalid/missing AppKey suggests that this is a basic configuration issue. Other than the html file itself, where else should I be looking to find how/where the "AppKey" is managed?
Aha, figured it out. I had neglected to fill in the ENTER_YOUR_SCRIPT_ID_HERE variable. That was easy! :)

Using Facebook API to publish. Getting whitelist error

I'm trying to publish to facebook from my program, but I'm getting:
{"error":{"type":"OAuthException","message":"(#3) App must be on whitelist"}}
I have the following app permissions:
"offline_access", "read_stream", "publish_stream"
Why is this happening?
If you are trying to post a status message then try the following syntax:
$r=facebook->api("/me/feed", "POST", array("message"=>"YOUR MESSAGE", "access_token"=>$SESSION['access_token']));
It should work.
If you're trying to "like" something, that function is apparently blocked by Facebook, except for apps in their "whitelist".
Getting this error when trying to send an inbox message.
Tried all I can think of and googled for, no progress.
I opened a support case here:
http://developers.facebook.com/bugs/183144141763793?browse=search_4e8b140cbf26e6040457329