Create a Team with owner (Application Permissions) - azure-active-directory

The documentation (example 2) on this page states that to specify an owner when creating a team an 'owners#odata.bind' property should be added to the POST.
The example shows a body of:
POST https://graph.microsoft.com/v1.0/teams
Content-Type: application/json
{
"template#odata.bind": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName": "My Sample Team",
"description": "My Sample Team’s Description",
"owners#odata.bind": [
"https://graph.microsoft.com/v1.0/users('userId')"
]
}
Trying that out in Graph Explorer (with a valid userId) results in a BadRequest error with a message of Invalid bind property name owners in request
Is this a bug? If not then what is the correct way to specify the owner when creating a team.
NOTE: I know there are other methods of creating a team (create group then convert etc), but this question is specifically about POSTing to the /teams endpoint

If I use the v1.0 version, I will encounter the same error as you, just change it to the beta version.

Although the call works correctly on the beta version of the endpoint it does not yet work on the v1.0 version endpoint.
I raised the issue with Microsoft and they confirmed it was an issue and raised a bug for it. I also reported it in the Microsoft docs, that the example provided does not work.

Related

Data fails to get synced on message's extended item properties using O365 REST API

Problem
We have an Outlook add-in that uses Outlook Office365 REST API to update mail item properties. One example is writing some custom metadata to the SingleValueExtendedProperties field of a mail-item.
Since yesterday we started noticing that the values that we write on the extended properties are not getting synced to the exchange server.
Steps to reproduce
PATCH on the Messages resource to update item properties with some data
Method: PATCH
URL: https://outlook.office.com/api/v2.0/me/messages('<messageId>')
Request Body:
{
"SingleValueExtendedProperties": [
{
"PropertyId": "{propertyId}",
"Value": “{\”color\":\"green\"}"
}
]
}
Use GET API to get the latest values.
Method: GET
URL: https://outlook.office.com/api/v2.0/me/messages('<messageId>')?$expand=SingleValueExtendedProperties($filter=PropertyId eq ‘{propertyId}’)
Observation
The PATCH call ran through successfully, but the GET call didn't return the latest values. The update that we tried yesterday also has not yet synced.
Environment
Client: Microsoft Outlook for Mac
Build Version: 16.42 (20101102)
Note
We have already started using the Microsoft Graph API in the new software that we are building since that’s the recommended one for interacting with mail/events. We still rely on Office365 API in our current systems to fetch/update data.
Is there a known issue that could be causing this? Is anyone else experiencing this?

Pub Sub Topic not associated with Project error

I'm trying to subscribe to push notifications from Google Classroom using this link and getting the following error. I have created the project, the topic and subscription under the same project and added the service account permissions as noted in the docs.
Right now I'm working on this in the API Explorer on this page.
I can verify that the topic lives under the developer console project.
Are there any other issues that would cause the topic to not be visible in this project?
{
"error": {
"code": 403,
"message": "#TopicNotOwnedByProject The specified Cloud Pub/Sub topic does not belong to your Developer Console project.",
"status": "PERMISSION_DENIED"
}
}
After a lot of frustration, I've realized that running the API Explorer will never result in a succesful API call because the API calls are not in my project scope but instead, whatever project the "API Explorer" runs in. This could be resolved if the API Explorer allowed you to select a project to run the sample requests in.
I went ahead and wrote out the code directly and it is working as expected.

LUIS Import app from json file throws BadArgument version id cannot be null error

I downloaded the bot application samples from github, and opened the luis application through visualstudio and tried to import the json file to creat a new app in luis.ai portal, but it was throwing error
"BadArgument: Version ID cannot be null or empty."
Open the .JSON file in notepad, and add the version parameter as highlighted in the below sample. i.e. VersionId: "0.1"
{
"luis_schema_version": "1.3.0",
"versionId": "0.1",
"name": "LuisBot",
"desc": "",
"culture": "en-us",
...
}
When we import new app on LUIS portal, it will make a request to this URL:
https://[location].api.cognitive.microsoft.com/luis/api/v2.0/apps/import[?appName]
In LUIS Programmatic APIs v2.0 documentation, we can find that the response 400 error will be returned if import JSON is incorrect. And the error message will reference the exact property that is causing the problem, as you see: Version ID cannot be null or empty.
Next time, before you import an new app, you can compare your json file with the sample LUIS application structure that provided in that documentation. And the documentation shows the causes of some issues, which can help us quickly troubleshoot the issue.
even if you provided the versionID, the app "name" is also mandatory so you have to fill it out.
Actually the import wizard asks you to provide the name. just leave it empty and make sure that you have updated the name in your .json file

docusign - sending an envelope using signing groups custom button

From this official docusign support guide, I understood that we don't need to add Email or FirstName or LastName atrributes in CRL call when SigningGroup is used. My custom button url in salesforce is below.
/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID=a3G4C000000HE8X&
CRL=SigningGroup~LegalSigner;RoutingOrder~20;Role~Signer5
&OCO=Send
When I try to send a document, I get the following exception:
Error: System.CalloutException: Web service callout failed: WebService
returned a SOAP Fault: The email address for the recipient is invalid.
The recipient Id follows. faultcode=soap:Client
faultactor=https://demo.docusign.net/api/3.0/dsapi.asmx
The error says that the email address is invalid, because I did not pass one in the CRL parameter.
Anyone have an idea on what is wrong with my custom button url?
I talked to docusign professional service team today and guess what? We need to upgrade our docusign installed package version in the org. (upgraded from 6.3 to 6.7.2)
This document from docusign website says
Future updates will be downloaded and installed automatically.
Wondering why it never got upgraded automatically for us. While the error message is so mis-leading, please check your version package number before you start using any new functionality that is released. Lesson Learned.

Access denied due to invalid subscription key (Face API)

I am having trouble using Microsoft Face API. Below is my sample request:
curl -v -X POST "https://westus.api.cognitive.microsoft.com/face/v1.0/detect?returnFaceId=true&returnFaceLandmarks=false&returnFaceAttributes=age,gender" -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key: 1xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxd" --data-ascii "{\"url\":\"http://www.mrbeantvseries.co.uk/bean3.jpg\"}"
I use the subscription id from my cognitive services account and I got below response:
{
"error": {
"code": "Unspecified",
"message": "Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key."
}
}
Not sure if I've missed out anything there. Can someone help me on this? Very much appreciated.
I ran into the same problem. I read the API documentation and it states the following.
You must use the same region in your REST API call as you used to obtain your subscription keys.
First, you must find the location of your subscription.
In order to find the location of your subscription region, you must go to Cognitive Services -> Properties under the Label Location, you will find your subscription region.
See below.
Second you must find the correct endpoint to make the call to.
For example, if I want to make a call to the Computer Vision API,
My location is East US, I will use either key 1 or 2, then I will use the following endpoint
East US - https://eastus.api.cognitive.microsoft.com/face/v1.0/detect
You will now be able to have access to the API.
It appears that you've entered your Azure subscription ID instead?
In the Azure portal, you can find the API key under 'Keys', shown below:
It will be a 32-digit hexadecimal number, no hyphens.
I had faced the same issue, it seems like there is some problem with the keys generated newly. To fix this you can actually add your endpoint as well, when you create the object for IFaceServiceClient. You can see the code below.
private readonly IFaceServiceClient faceServiceClient = new FaceServiceClient("your key", "Your endpoint");
CesarB is correct. You must create a Resource of Cognitive Service in Azure first and then get the subscription key from it.
the region is not always 'westus', it really depends on what region you select when you created the resource. You can also check it on the endpoint of overview of the Resource
I ran into a similar problem. I figure it might be helpful to some people, so I am posting it here. (btw Azure support points me to this post here)
I was trying to run through the sample file for ImageSearch of Azure. I was refering to these pages:
https://learn.microsoft.com/en-us/azure/cognitive-services/bing-image-search/quickstarts/csharp
https://learn.microsoft.com/en-us/azure/cognitive-services/bing-image-search/quickstarts/client-libraries?tabs=visualstudio&pivots=programming-language-csharp
https://github.com/Azure-Samples/cognitive-services-dotnet-sdk-samples/blob/master/BingSearchv7/BingImageSearch/quickstart/bing-image-search-quickstart-csharp.cs
I was receiving a mixture of 404 Not Found error & 401 unauthorized error when send requests to the Bing Search resource, using
Microsoft.Azure.CognitiveServices.Search.ImageSearch. I figure it must be something wrong with either my credentials or my endpoints.
After struggling with it for hours, reading through posts and talking to Azure support member, I finally find the problems:
The base Uri Endpoint I was assigned on the Azure Keys & Endpoints webpage is incomplete. (https://api.bing.microsoft.com/)
The base Uri Endpoint on the sample tutorial pages was outdated because of the 2020.10.30 transition between Cognitive Services to Bing Search Services. (https://api.cognitive.microsoft.com/bing/v7.0/images/search)
As of 2021.09.22, the correct global base Uri Endpoint for Bing Image Search is:
https://api.bing.microsoft.com/v7.0/images/search
Hope this would be helpful to anyone and save mankind some time.
Endpoint
https://westeurope.api.cognitive.microsoft.com/face/v1.0
Endpoint and the subscription key must be consistent.
look at Microsoft Overview for this info!

Resources