Office 365 Calendar API - office365api

I am new to Office 365 api. I got online and tried to used the microsoft virtual academy and other similar to it. I followed the direction from this site linkhttps://msdn.microsoft.com/office/office365/howto/authenticate-and-use-services; step for step, but I am getting an error that looks like thisError message
The steps are not hard at all. When I go into debug mode these two lines always come back null. There is very little information out there about these two lines.
var signInUserId=ClaimsPrincipal.Current.FindFirst(ClaimTypes.Email).Value;
var userObjectId = ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/objectidentifier").Value;
If you are looking for my code it is provided in the link I gave above. Those are all my files. To the T. Thanks in advance for any help.
Question 1. Do anyone have better resources other than the ones I am using
Question 2. Can those lines be null.
Question 3. Where can I find a SOLID tutorial online that works 100%

The error is because that there is no “mail” type data in the claims. To construct the AuthenticationContext object, we should use the ‘ClaimTypes.NameIdentifier’ as the ’signInUserId’ instead of ‘ClaimTypes.Email’.
And you can refer to the whole sample code from here.

Related

how to do manual search on NCBI with biopython and add link to publication

I'm trying to reproduce manual search on NCBI with biopython but obviously something is not good in my code..
NCBI gives me that : "Microbacterium"[Organism] AND "latest refseq"[filter] AND (all[filter] NOT partial[filter])
i'm trying :
query = "Microbacterium[Organism] AND latest refseq[filter] AND (all[filter] NOT partial[filter])"
handle = Entrez.esearch(term=query, db="nuccore", retmax=600)
ids = Entrez.read(handle)["IdList"]
but ids is empty, i'm supposed to find 512 genomes that i would like to get after.
if someone has an idea where i did mistake?
and to add point to my question, does everyone know if we can get only genomes related to a published paper?
thanks a lot!

Confused about Google Ads documentation

I've adapted the code at https://developers.google.com/google-ads/api/docs/keyword-planning/generate-keyword-ideas. I don't understand why at one point why the example says,
var response = keywordPlanIdeaService.GenerateKeywordIdeas(request);
and then about three lines later says,
KeywordPlanHistoricalMetrics metrics = result.KeywordIdeaMetrics;
It seems on the one hand to be generating keyword ideas and then on the other giving history.
Now in the KeywordPlanIdeaService documentation it says that there's GenerateKeywordHistoricalMetrics and GenerateKeywordIdeas. However when I try to use the former instead of the latter in the example, VS2022 indicates that the name is unknown.
So my questions are:
What does the C# code on the "idea generation" page demonstrate? Is it demonstrating Ideas or Historical Metrics.
Are these the same, conceptually, as AdWords' IDEAS and STATS respectively?
If it is in fact demonstrating Ideas, how would one adapt it for Historical Metrics?

Error: 'Imported XML Content cannot be parsed'

Here's what I'm doing:
=IMPORTXML("https://www.predictit.org/api/marketdata/markets/7164", "/MarketData/Contracts/MarketContract/ID")
The other answers I've seen about this have said that Javascript would be the issue, but the page in question seems to load without it, and I've tried using IMPORTJSON and IMPORTFROMWEB to no avail.
Please help!
You are input incorrect parameter for the xmlpath, a proper formula should be as following and you need to spend sometime to find the correct xmlpath to extract the specific string or information you want,
=IMPORTXML("https://www.predictit.org/api/marketdata/markets/7164","//a/#href")
Here is one example from Google:
=IMPORTXML("https://en.wikipedia.org/wiki/Moon_landing", "//a/#href")

How to add PDF-Viewer Tab to Channel in Microsoft Teams?

Adding a PDF-Viewer tab to present/show a Sharepoint document has been working before.
I've tried this in January and it seemed to be an easy task - just get the DriveItem ID and URL (from GET /groups/{group-id}/drive/items/{item-id}) and edit the sample from the API Reference with these values (https://learn.microsoft.com/de-de/graph/teams-configuring-builtin-tabs#word-excel-powerpoint-and-pdf-tabs).
Now, that i want to use this, it doesn't work anymore ;-( The tab is created, added to channel, the name of the file shows BUT there is no document!!! What am i missing? Has the format changed? Has someone lately gotten this to work???
Please let me know, how! ;-)
ps: there is no description of the property "entityID" that makes any sense, can anyone explain it?
result in teams
Got the answer, was a Syntax problem!
The "contentURL" property needs to be unescaped (in this case the "%20"). It is that simple after all ;-)
Also i found out, the "entityID" property has no meaning for the File used. It can be "null" actually! I still use the ItemID i got from the DriveItem of the File.
For unescaping i used:
string contentUrl = Uri.UnescapeDataString(webUrl);
If it wasn't for this post I would have not gotten it figured out, so thank you!
For me I ended up having to make entityID null, just unescaping the contentURL didn't do it for me alone.
Thanks for your comment. leaving entityID null fixed my isse also.
I opend an issue to have the docs fixed!

QBD Query by Customer Name (DevKit)

I think this has been asked before, but I'm going to give it another shot in the hope of getting a useful answer.
Using the DevKit and C# (not XML) how can I look up a customer by name? In the SDK it was a no-brainer to look up a customer by FullName, but now I can't find any way to do it. It defies common sense that the DevKit wouldn't provide a way to do this.
Please don't reply with links to documentation that doesn't have the answer (I've read it several times), or XML that doesn't work. I'd love to see C# code that does this (heck, I'll even settle for VB), but if it can't be done, please just tell me so I can end this and get some rest.
var qbdCustomerQuery1 = new Intuit.Ipp.Data.Qbd.CustomerQuery();
qbdCustomerQuery1.Item1ElementName = Intuit.Ipp.Data.Qbd.Item1ChoiceType.FirstLastInside; qbdCustomerQuery1.Item1 = "Popeye";
List CustomerQueryResult = qbdCustomerQuery1.ExecuteQuery(context).ToList();
This should work.
We will try to improve the docs for such queries.
Can you give it a try
ServiceContext context = new ServiceContext(oauthValidator, appToken, realmId, IntuitServicesType.QBD)
CustomerQuery customerQuery = new CustomerQuery();
customerQuery.FirstLastName ="?"
IEnumerable<Customer> customers = customerQuery.ExecuteQuery<Customer>(context);
Ref - https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0100_ipp_.net_devkit/query_filters/quickbooks_desktop
In the client side, you can loop through 'customers' and use an if condition for only customer's name.
Thanks

Resources